Class: Stripe::InvoiceCreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::InvoiceCreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount
- Defined in:
- lib/stripe/params/invoice_create_preview_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
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil, settings: nil) ⇒ Discount
Returns a new instance of Discount.
781 782 783 784 785 786 787 788 789 790 791 792 793 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 781 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.
771 772 773 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 771 def coupon @coupon end |
#discount ⇒ Object
ID of an existing discount on the object (or one of its ancestors) to reuse.
773 774 775 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 773 def discount @discount end |
#discount_end ⇒ Object
Details to determine how long the discount should be applied for.
775 776 777 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 775 def discount_end @discount_end end |
#promotion_code ⇒ Object
ID of the promotion code to create a new discount for.
777 778 779 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 777 def promotion_code @promotion_code end |
#settings ⇒ Object
Settings for discount application including service period anchoring.
779 780 781 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 779 def settings @settings end |