Class: Stripe::V2::Billing::ContractCreateParams::PricingLine

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

Defined Under Namespace

Classes: EndsAt, Pricing, StartsAt

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(ends_at: nil, lookup_key: nil, metadata: nil, pricing: nil, starts_at: nil) ⇒ PricingLine

Returns a new instance of PricingLine.



317
318
319
320
321
322
323
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 317

def initialize(ends_at: nil, lookup_key: nil, metadata: nil, pricing: nil, starts_at: nil)
  @ends_at = ends_at
  @lookup_key = lookup_key
  @metadata = 
  @pricing = pricing
  @starts_at = starts_at
end

Instance Attribute Details

#ends_atObject

When the pricing line ends.



307
308
309
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 307

def ends_at
  @ends_at
end

#lookup_keyObject

A user-provided lookup key to reference this pricing line.



309
310
311
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 309

def lookup_key
  @lookup_key
end

#metadataObject

Set of key-value pairs that you can attach to an object.



311
312
313
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 311

def 
  @metadata
end

#pricingObject

The pricing configuration for the pricing line.



313
314
315
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 313

def pricing
  @pricing
end

#starts_atObject

When the pricing line starts.



315
316
317
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 315

def starts_at
  @starts_at
end

Class Method Details

.field_encodingsObject



325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 325

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