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

import Foundation
import Get
import URLQueryEncoder

extension Paths.Billing {
    public var acceptSubCoupon: AcceptSubCoupon {
        AcceptSubCoupon(path: path + "/accept-sub-coupon")
    }

    public struct AcceptSubCoupon {
        /// Path: `/api/billing/accept-sub-coupon`
        public let path: String

        /// Accept Sub Coupon
        ///
        /// Accept a discount coupon for the user's subscription.
        /// 
        /// Note: This endpoint applies the coupon to the user's Stripe subscription,
        /// but the discount is only actually redeemed/applied when the subscription
        /// renews on its next billing cycle.
        public func post(_ body: GenAPI.AcceptSubCouponSpec) -> Request<GenAPI.AcceptSubCouponResponse> {
            Request(path: path, method: "POST", body: body, id: "studio_api_bots_billing_api_accept_sub_coupon")
        }
    }
}
