Class: Stripe::InvoiceCreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Set

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/invoice_create_preview_params.rb

Defined Under Namespace

Classes: Settings

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(coupon: nil, discount: nil, promotion_code: nil, settings: nil) ⇒ Set

Returns a new instance of Set.



669
670
671
672
673
674
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 669

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

Instance Attribute Details

#couponObject

The coupon code to replace the ‘discounts` array with.



661
662
663
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 661

def coupon
  @coupon
end

#discountObject

An ID of an existing discount to replace the ‘discounts` array with.



663
664
665
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 663

def discount
  @discount
end

#promotion_codeObject

An ID of an existing promotion code to replace the ‘discounts` array with.



665
666
667
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 665

def promotion_code
  @promotion_code
end

#settingsObject

Settings for discount application including service period anchoring.



667
668
669
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 667

def settings
  @settings
end