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.



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

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.



355
356
357
# File 'lib/stripe/services/checkout/session_service.rb', line 355

def coupon
  @coupon
end

#promotion_codeObject

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



357
358
359
# File 'lib/stripe/services/checkout/session_service.rb', line 357

def promotion_code
  @promotion_code
end