Class: Stripe::V2::Billing::ContractCreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::V2::Billing::ContractCreateParams
- Defined in:
- lib/stripe/params/v2/billing/contract_create_params.rb
Defined Under Namespace
Classes: BillingCycleAnchor, BillingSettings, PricingLine, PricingOverride
Instance Attribute Summary collapse
-
#billing_cycle_anchor ⇒ Object
The billing cycle anchor for the contract.
-
#billing_settings ⇒ Object
The billing settings for the contract.
-
#contract_number ⇒ Object
A unique user-provided contract number e.g.
-
#currency ⇒ Object
Currency of the contract.
-
#include ⇒ Object
Additional fields to include in the response.
-
#metadata ⇒ Object
Set of key-value pairs that you can attach to an object.
-
#pricing_lines ⇒ Object
A list of pricing lines to create with the contract.
-
#pricing_overrides ⇒ Object
A list of pricing overrides to create with the contract.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(billing_cycle_anchor: nil, billing_settings: nil, contract_number: nil, currency: nil, include: nil, metadata: nil, pricing_lines: nil, pricing_overrides: nil) ⇒ ContractCreateParams
constructor
A new instance of ContractCreateParams.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(billing_cycle_anchor: nil, billing_settings: nil, contract_number: nil, currency: nil, include: nil, metadata: nil, pricing_lines: nil, pricing_overrides: nil) ⇒ ContractCreateParams
Returns a new instance of ContractCreateParams.
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 442 def initialize( billing_cycle_anchor: nil, billing_settings: nil, contract_number: nil, currency: nil, include: nil, metadata: nil, pricing_lines: nil, pricing_overrides: nil ) @billing_cycle_anchor = billing_cycle_anchor @billing_settings = billing_settings @contract_number = contract_number @currency = currency @include = include @metadata = @pricing_lines = pricing_lines @pricing_overrides = pricing_overrides end |
Instance Attribute Details
#billing_cycle_anchor ⇒ Object
The billing cycle anchor for the contract. If not provided, defaults to the pricing line start time. It is only at the top-level of the contract with no option to override at the pricing line level.
426 427 428 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 426 def billing_cycle_anchor @billing_cycle_anchor end |
#billing_settings ⇒ Object
The billing settings for the contract.
428 429 430 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 428 def billing_settings @billing_settings end |
#contract_number ⇒ Object
A unique user-provided contract number e.g. C-2026-0001.
430 431 432 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 430 def contract_number @contract_number end |
#currency ⇒ Object
Currency of the contract.
432 433 434 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 432 def currency @currency end |
#include ⇒ Object
Additional fields to include in the response.
434 435 436 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 434 def include @include end |
#metadata ⇒ Object
Set of key-value pairs that you can attach to an object.
436 437 438 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 436 def @metadata end |
#pricing_lines ⇒ Object
A list of pricing lines to create with the contract.
438 439 440 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 438 def pricing_lines @pricing_lines end |
#pricing_overrides ⇒ Object
A list of pricing overrides to create with the contract.
440 441 442 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 440 def pricing_overrides @pricing_overrides end |
Class Method Details
.field_encodings ⇒ Object
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 462 def self.field_encodings @field_encodings = { pricing_lines: { kind: :array, element: { kind: :object, fields: { pricing: { kind: :object, fields: { price_details: { kind: :object, fields: { quantity_changes: { kind: :array, element: { kind: :object, fields: { set: :decimal_string } }, }, }, }, }, }, }, }, }, } end |