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.



1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
# File 'lib/stripe/resources/subscription_schedule.rb', line 1959

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



1947
1948
1949
# File 'lib/stripe/resources/subscription_schedule.rb', line 1947

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



1949
1950
1951
# File 'lib/stripe/resources/subscription_schedule.rb', line 1949

def 
  @metadata
end

#priceObject

The ID of the price object.



1951
1952
1953
# File 'lib/stripe/resources/subscription_schedule.rb', line 1951

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



1953
1954
1955
# File 'lib/stripe/resources/subscription_schedule.rb', line 1953

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



1955
1956
1957
# File 'lib/stripe/resources/subscription_schedule.rb', line 1955

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



1957
1958
1959
# File 'lib/stripe/resources/subscription_schedule.rb', line 1957

def trial
  @trial
end