Class: Stripe::InvoiceCreatePreviewParams::ScheduleDetails::Amendment::ItemAction

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) ⇒ ItemAction

Returns a new instance of ItemAction.



1005
1006
1007
1008
1009
1010
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1005

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 subscription item to add. If an item with the same price exists, it will be replaced by this new item. Otherwise, it adds the new item.



997
998
999
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 997

def add
  @add
end

#removeObject

Details of the subscription item to remove.



999
1000
1001
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 999

def remove
  @remove
end

#setObject

Details of the subscription item to replace the existing items with. If an item with the set[price] already exists, the items array is not cleared. Instead, all of the other set properties that are passed in this request will replace the existing values for the configuration item.



1001
1002
1003
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1001

def set
  @set
end

#typeObject

Determines the type of item action.



1003
1004
1005
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1003

def type
  @type
end