Class: Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/invoice_service.rb

Defined Under Namespace

Classes: Add, Remove, Set

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(add: nil, remove: nil, set: nil, type: nil) ⇒ ItemAction

Returns a new instance of ItemAction.



2092
2093
2094
2095
2096
2097
# File 'lib/stripe/services/invoice_service.rb', line 2092

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.



2084
2085
2086
# File 'lib/stripe/services/invoice_service.rb', line 2084

def add
  @add
end

#removeObject

Details of the subscription item to remove.



2086
2087
2088
# File 'lib/stripe/services/invoice_service.rb', line 2086

def remove
  @remove
end

#setObject

Details of the subscription item to replace the existing items with. If an item with the ‘set` 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.



2088
2089
2090
# File 'lib/stripe/services/invoice_service.rb', line 2088

def set
  @set
end

#typeObject

Determines the type of item action.



2090
2091
2092
# File 'lib/stripe/services/invoice_service.rb', line 2090

def type
  @type
end