Class: Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set

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



2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
# File 'lib/stripe/services/invoice_service.rb', line 2789

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



2777
2778
2779
# File 'lib/stripe/services/invoice_service.rb', line 2777

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



2779
2780
2781
# File 'lib/stripe/services/invoice_service.rb', line 2779

def 
  @metadata
end

#priceObject

The ID of the price object.



2781
2782
2783
# File 'lib/stripe/services/invoice_service.rb', line 2781

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



2783
2784
2785
# File 'lib/stripe/services/invoice_service.rb', line 2783

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



2785
2786
2787
# File 'lib/stripe/services/invoice_service.rb', line 2785

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



2787
2788
2789
# File 'lib/stripe/services/invoice_service.rb', line 2787

def trial
  @trial
end