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

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

Defined Under Namespace

Classes: Add, Remove, Set

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(add: nil, remove: nil, set: nil, type: nil) ⇒ DiscountAction

Returns a new instance of DiscountAction.



518
519
520
521
522
523
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 518

def initialize(add: nil, remove: nil, set: nil, type: nil)
  @add = add
  @remove = remove
  @set = set
  @type = type
end

Instance Attribute Details

#addObject

Details of the discount to add.



510
511
512
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 510

def add
  @add
end

#removeObject

Details of the discount to remove.



512
513
514
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 512

def remove
  @remove
end

#setObject

Details of the discount to replace the existing discounts with.



514
515
516
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 514

def set
  @set
end

#typeObject

Determines the type of discount action.



516
517
518
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 516

def type
  @type
end