Class: Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/subscription_schedule_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.



1813
1814
1815
1816
1817
1818
# File 'lib/stripe/services/subscription_schedule_service.rb', line 1813

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.



1805
1806
1807
# File 'lib/stripe/services/subscription_schedule_service.rb', line 1805

def add
  @add
end

#removeObject

Details of the subscription item to remove.



1807
1808
1809
# File 'lib/stripe/services/subscription_schedule_service.rb', line 1807

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.



1809
1810
1811
# File 'lib/stripe/services/subscription_schedule_service.rb', line 1809

def set
  @set
end

#typeObject

Determines the type of item action.



1811
1812
1813
# File 'lib/stripe/services/subscription_schedule_service.rb', line 1811

def type
  @type
end