Class: Stripe::V2::Billing::ContractCreateParams::PricingLine::Pricing::PriceDetails

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/v2/billing/contract_create_params.rb

Defined Under Namespace

Classes: PricingOverride, QuantityChange

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, new, #to_h

Constructor Details

#initialize(price: nil, pricing_overrides: nil, quantity_changes: nil) ⇒ PriceDetails

Returns a new instance of PriceDetails.



255
256
257
258
259
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 255

def initialize(price: nil, pricing_overrides: nil, quantity_changes: nil)
  @price = price
  @pricing_overrides = pricing_overrides
  @quantity_changes = quantity_changes
end

Instance Attribute Details

#priceObject

The id of the price.



248
249
250
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 248

def price
  @price
end

#pricing_overridesObject

Pricing overrides embedded directly on this pricing line.



250
251
252
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 250

def pricing_overrides
  @pricing_overrides
end

#quantity_changesObject

Quantity changes for the pricing line. For now, at most one entry is allowed. A quantity change clears all future quantity changes on this pricing line. Defaults to 1.



253
254
255
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 253

def quantity_changes
  @quantity_changes
end

Class Method Details

.field_encodingsObject



261
262
263
264
265
266
267
268
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 261

def self.field_encodings
  @field_encodings = {
    quantity_changes: {
      kind: :array,
      element: { kind: :object, fields: { set: :decimal_string } },
    },
  }
end