Class: Stripe::Checkout::Session::CreateParams::Discount
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::Session::CreateParams::Discount
- Defined in:
- lib/stripe/resources/checkout/session.rb
Defined Under Namespace
Classes: CouponData
Instance Attribute Summary collapse
-
#coupon ⇒ Object
The ID of the coupon to apply to this Session.
-
#coupon_data ⇒ Object
Data used to generate a new [Coupon](stripe.com/docs/api/coupon) object inline.
-
#promotion_code ⇒ Object
The ID of a promotion code to apply to this Session.
Instance Method Summary collapse
-
#initialize(coupon: nil, coupon_data: nil, promotion_code: nil) ⇒ Discount
constructor
A new instance of Discount.
Methods inherited from RequestParams
Constructor Details
#initialize(coupon: nil, coupon_data: nil, promotion_code: nil) ⇒ Discount
Returns a new instance of Discount.
2562 2563 2564 2565 2566 |
# File 'lib/stripe/resources/checkout/session.rb', line 2562 def initialize(coupon: nil, coupon_data: nil, promotion_code: nil) @coupon = coupon @coupon_data = coupon_data @promotion_code = promotion_code end |
Instance Attribute Details
#coupon ⇒ Object
The ID of the coupon to apply to this Session.
2556 2557 2558 |
# File 'lib/stripe/resources/checkout/session.rb', line 2556 def coupon @coupon end |
#coupon_data ⇒ Object
Data used to generate a new [Coupon](stripe.com/docs/api/coupon) object inline. One of ‘coupon` or `coupon_data` is required when updating discounts.
2558 2559 2560 |
# File 'lib/stripe/resources/checkout/session.rb', line 2558 def coupon_data @coupon_data end |
#promotion_code ⇒ Object
The ID of a promotion code to apply to this Session.
2560 2561 2562 |
# File 'lib/stripe/resources/checkout/session.rb', line 2560 def promotion_code @promotion_code end |