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.



2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
# File 'lib/stripe/resources/subscription_schedule.rb', line 2085

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`.



2073
2074
2075
# File 'lib/stripe/resources/subscription_schedule.rb', line 2073

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`.



2075
2076
2077
# File 'lib/stripe/resources/subscription_schedule.rb', line 2075

def 
  @metadata
end

#priceObject

The ID of the price object.



2077
2078
2079
# File 'lib/stripe/resources/subscription_schedule.rb', line 2077

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`.



2079
2080
2081
# File 'lib/stripe/resources/subscription_schedule.rb', line 2079

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`.



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

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`.



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

def trial
  @trial
end