Class: Stripe::Checkout::SessionUpdateParams::Discount
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::SessionUpdateParams::Discount
- Defined in:
- lib/stripe/params/checkout/session_update_params.rb
Defined Under Namespace
Classes: CouponData
Instance Attribute Summary collapse
-
#coupon ⇒ Object
The ID of the [Coupon](docs.stripe.com/api/coupons) to apply to this Session.
-
#coupon_data ⇒ Object
Data used to generate a new [Coupon](docs.stripe.com/api/coupon) object inline.
Instance Method Summary collapse
-
#initialize(coupon: nil, coupon_data: nil) ⇒ Discount
constructor
A new instance of Discount.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(coupon: nil, coupon_data: nil) ⇒ Discount
Returns a new instance of Discount.
113 114 115 116 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 113 def initialize(coupon: nil, coupon_data: nil) @coupon = coupon @coupon_data = coupon_data end |
Instance Attribute Details
#coupon ⇒ Object
The ID of the [Coupon](docs.stripe.com/api/coupons) to apply to this Session. One of ‘coupon` or `coupon_data` is required when updating discounts.
109 110 111 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 109 def coupon @coupon end |
#coupon_data ⇒ Object
Data used to generate a new [Coupon](docs.stripe.com/api/coupon) object inline. One of ‘coupon` or `coupon_data` is required when updating discounts.
111 112 113 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 111 def coupon_data @coupon_data end |