Class: Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/subscription_schedule.rb

Defined Under Namespace

Classes: Discount, Trial

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(discounts: nil, metadata: nil, price: nil, quantity: nil, tax_rates: nil, trial: nil) ⇒ Set

Returns a new instance of Set.



2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
# File 'lib/stripe/resources/subscription_schedule.rb', line 2094

def initialize(
  discounts: nil,
  metadata: nil,
  price: nil,
  quantity: nil,
  tax_rates: nil,
  trial: nil
)
  @discounts = discounts
  @metadata = 
  @price = price
  @quantity = quantity
  @tax_rates = tax_rates
  @trial = trial
end

Instance Attribute Details

#discountsObject

If an item with the ‘price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.



2082
2083
2084
# File 'lib/stripe/resources/subscription_schedule.rb', line 2082

def discounts
  @discounts
end

#metadataObject

If an item with the ‘price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.



2084
2085
2086
# File 'lib/stripe/resources/subscription_schedule.rb', line 2084

def 
  @metadata
end

#priceObject

The ID of the price object.



2086
2087
2088
# File 'lib/stripe/resources/subscription_schedule.rb', line 2086

def price
  @price
end

#quantityObject

If an item with the ‘price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.



2088
2089
2090
# File 'lib/stripe/resources/subscription_schedule.rb', line 2088

def quantity
  @quantity
end

#tax_ratesObject

If an item with the ‘price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.



2090
2091
2092
# File 'lib/stripe/resources/subscription_schedule.rb', line 2090

def tax_rates
  @tax_rates
end

#trialObject

If an item with the ‘price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.



2092
2093
2094
# File 'lib/stripe/resources/subscription_schedule.rb', line 2092

def trial
  @trial
end