Class: Stripe::V2::Billing::Contract
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Billing::Contract
- Defined in:
- lib/stripe/resources/v2/billing/contract.rb
Overview
Contract resource representing a comprehensive sales agreement
Defined Under Namespace
Classes: BillingCycleAnchor, BillingSettings, PricingLines, PricingOverrides, StatusTransitions
Constant Summary collapse
- OBJECT_NAME =
"v2.billing.contract"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#billing_cycle_anchor ⇒ Object
readonly
The billing cycle anchor.
-
#billing_settings ⇒ Object
readonly
The billing settings.
-
#contract_number ⇒ Object
readonly
A unique user-provided contract number e.g.
-
#created ⇒ Object
readonly
Timestamp of when the contract was created.
-
#currency ⇒ Object
readonly
The currency.
-
#customer ⇒ Object
readonly
The customer id.
-
#id ⇒ Object
readonly
The contract id.
-
#livemode ⇒ Object
readonly
Has the value
trueif the object exists in live mode or the valuefalseif the object exists in test mode. -
#metadata ⇒ Object
readonly
Set of key-value pairs.
-
#object ⇒ Object
readonly
String representing the object's type.
-
#pricing_lines ⇒ Object
readonly
The pricing lines.
-
#pricing_overrides ⇒ Object
readonly
The pricing overrides.
-
#status ⇒ Object
readonly
The current status of the contract.
-
#status_transitions ⇒ Object
readonly
Historical timestamps of when the contract transitioned into each status.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_encodings ⇒ Object
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
- .object_name ⇒ Object
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#billing_cycle_anchor ⇒ Object (readonly)
The billing cycle anchor.
466 467 468 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 466 def billing_cycle_anchor @billing_cycle_anchor end |
#billing_settings ⇒ Object (readonly)
The billing settings.
468 469 470 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 468 def billing_settings @billing_settings end |
#contract_number ⇒ Object (readonly)
A unique user-provided contract number e.g. C-2026-0001.
470 471 472 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 470 def contract_number @contract_number end |
#created ⇒ Object (readonly)
Timestamp of when the contract was created.
472 473 474 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 472 def created @created end |
#currency ⇒ Object (readonly)
The currency.
474 475 476 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 474 def currency @currency end |
#customer ⇒ Object (readonly)
The customer id.
476 477 478 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 476 def customer @customer end |
#id ⇒ Object (readonly)
The contract id.
478 479 480 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 478 def id @id end |
#livemode ⇒ Object (readonly)
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
480 481 482 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 480 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of key-value pairs.
482 483 484 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 482 def @metadata end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value of the object field.
484 485 486 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 484 def object @object end |
#pricing_lines ⇒ Object (readonly)
The pricing lines. Only populated when pricing_lines is passed in the include parameter.
486 487 488 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 486 def pricing_lines @pricing_lines end |
#pricing_overrides ⇒ Object (readonly)
The pricing overrides. Only populated when pricing_overrides is passed in the include parameter.
488 489 490 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 488 def pricing_overrides @pricing_overrides end |
#status ⇒ Object (readonly)
The current status of the contract.
490 491 492 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 490 def status @status end |
#status_transitions ⇒ Object (readonly)
Historical timestamps of when the contract transitioned into each status.
492 493 494 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 492 def status_transitions @status_transitions end |
Class Method Details
.field_encodings ⇒ Object
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 508 def self.field_encodings @field_encodings = { pricing_lines: { kind: :object, fields: { data: { kind: :array, element: { kind: :object, fields: { pricing: { kind: :object, fields: { price_details: { kind: :object, fields: { current_quantity: :decimal_string }, }, }, }, }, }, }, }, }, } end |
.field_remappings ⇒ Object
504 505 506 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 504 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
494 495 496 497 498 499 500 501 502 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 494 def self.inner_class_types @inner_class_types = { billing_cycle_anchor: BillingCycleAnchor, billing_settings: BillingSettings, pricing_lines: PricingLines, pricing_overrides: PricingOverrides, status_transitions: StatusTransitions, } end |
.object_name ⇒ Object
10 11 12 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 10 def self.object_name "v2.billing.contract" end |