Class: Stripe::Checkout::Session::CreateParams::Discount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/checkout/session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(coupon: nil, promotion_code: nil) ⇒ Discount

Returns a new instance of Discount.



1462
1463
1464
1465
# File 'lib/stripe/resources/checkout/session.rb', line 1462

def initialize(coupon: nil, promotion_code: nil)
  @coupon = coupon
  @promotion_code = promotion_code
end

Instance Attribute Details

#couponObject

The ID of the coupon to apply to this Session.



1458
1459
1460
# File 'lib/stripe/resources/checkout/session.rb', line 1458

def coupon
  @coupon
end

#promotion_codeObject

The ID of a promotion code to apply to this Session.



1460
1461
1462
# File 'lib/stripe/resources/checkout/session.rb', line 1460

def promotion_code
  @promotion_code
end