Class: Stripe::SubscriptionItemUpdateParams::Discount
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::SubscriptionItemUpdateParams::Discount
- Defined in:
- lib/stripe/params/subscription_item_update_params.rb
Defined Under Namespace
Classes: DiscountEnd, Settings
Instance Attribute Summary collapse
-
#coupon ⇒ Object
ID of the coupon to create a new discount for.
-
#discount ⇒ Object
ID of an existing discount on the object (or one of its ancestors) to reuse.
-
#discount_end ⇒ Object
Details to determine how long the discount should be applied for.
-
#promotion_code ⇒ Object
ID of the promotion code to create a new discount for.
-
#settings ⇒ Object
Settings for discount application including service period anchoring.
Instance Method Summary collapse
-
#initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil, settings: nil) ⇒ Discount
constructor
A new instance of Discount.
Methods inherited from RequestParams
Constructor Details
#initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil, settings: nil) ⇒ Discount
Returns a new instance of Discount.
107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/stripe/params/subscription_item_update_params.rb', line 107 def initialize( coupon: nil, discount: nil, discount_end: nil, promotion_code: nil, settings: nil ) @coupon = coupon @discount = discount @discount_end = discount_end @promotion_code = promotion_code @settings = settings end |
Instance Attribute Details
#coupon ⇒ Object
ID of the coupon to create a new discount for.
97 98 99 |
# File 'lib/stripe/params/subscription_item_update_params.rb', line 97 def coupon @coupon end |
#discount ⇒ Object
ID of an existing discount on the object (or one of its ancestors) to reuse.
99 100 101 |
# File 'lib/stripe/params/subscription_item_update_params.rb', line 99 def discount @discount end |
#discount_end ⇒ Object
Details to determine how long the discount should be applied for.
101 102 103 |
# File 'lib/stripe/params/subscription_item_update_params.rb', line 101 def discount_end @discount_end end |
#promotion_code ⇒ Object
ID of the promotion code to create a new discount for.
103 104 105 |
# File 'lib/stripe/params/subscription_item_update_params.rb', line 103 def promotion_code @promotion_code end |
#settings ⇒ Object
Settings for discount application including service period anchoring.
105 106 107 |
# File 'lib/stripe/params/subscription_item_update_params.rb', line 105 def settings @settings end |