Class: Stripe::Checkout::SessionService::CreateParams::Discount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/checkout/session_service.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.



363
364
365
366
# File 'lib/stripe/services/checkout/session_service.rb', line 363

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.



359
360
361
# File 'lib/stripe/services/checkout/session_service.rb', line 359

def coupon
  @coupon
end

#promotion_codeObject

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



361
362
363
# File 'lib/stripe/services/checkout/session_service.rb', line 361

def promotion_code
  @promotion_code
end