Class: Stripe::Subscription::UpdateParams::Item::Discount

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

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

Returns a new instance of Discount.



466
467
468
469
470
# File 'lib/stripe/resources/subscription.rb', line 466

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

Instance Attribute Details

#couponObject

ID of the coupon to create a new discount for.



460
461
462
# File 'lib/stripe/resources/subscription.rb', line 460

def coupon
  @coupon
end

#discountObject

ID of an existing discount on the object (or one of its ancestors) to reuse.



462
463
464
# File 'lib/stripe/resources/subscription.rb', line 462

def discount
  @discount
end

#promotion_codeObject

ID of the promotion code to create a new discount for.



464
465
466
# File 'lib/stripe/resources/subscription.rb', line 464

def promotion_code
  @promotion_code
end