// Generated by Create API
// https://github.com/CreateAPI/CreateAPI

import Foundation
import Get
import URLQueryEncoder

extension Paths.Invite.Ios {
    public var promoCode: PromoCode {
        PromoCode(path: path + "/promo_code")
    }

    public struct PromoCode {
        /// Path: `/api/invite/ios/promo_code`
        public let path: String

        /// Redeem Promo Code
        ///
        /// Redeem the promo code for the request user.
        /// We use lower case promo codes in the db.
        /// If successful, the user can log in, whether or not the promo code was used.
        public func post(_ body: GenAPI.UsePromoCodeRequest) -> Request<GenAPI.UsePromoCodeResponse> {
            Request(path: path, method: "POST", body: body, id: "studio_api_bots_invite_ios_api_redeem_promo_code")
        }
    }
}
