Class: Stripe::V2::Billing::Contract
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Billing::Contract
- Defined in:
- lib/stripe/resources/v2/billing/contract.rb
Overview
Main Contract resource representing a comprehensive billing agreement
Defined Under Namespace
Classes: BillingSettings, ContractLineDetail, ContractValueDetails, LicenseQuantity, OneTimeFee, PricingLine, PricingOverride, StatusDetails
Constant Summary collapse
- OBJECT_NAME =
"v2.billing.contract"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#billing_settings ⇒ Object
readonly
The billing settings for the contract.
-
#contract_line_details ⇒ Object
readonly
The contract line details of the contract.
-
#contract_number ⇒ Object
readonly
A unique user-provided contract number e.g.
-
#contract_value_details ⇒ Object
readonly
The computed total value of all contract lines.
-
#created ⇒ Object
readonly
Timestamp of when the object was created.
-
#currency ⇒ Object
readonly
The currency of the contract.
-
#customer ⇒ Object
readonly
The ID of the customer associated with the contract.
-
#id ⇒ Object
readonly
The ID of the contract object.
-
#license_quantities ⇒ Object
readonly
The license quantities of the contract.
-
#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.
-
#metadata ⇒ Object
readonly
Set of key-value pairs that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#one_time_fees ⇒ Object
readonly
The one-time fees of the contract.
-
#pricing_lines ⇒ Object
readonly
The pricing lines of the contract.
-
#pricing_overrides ⇒ Object
readonly
The pricing overrides of the contract.
-
#status ⇒ Object
readonly
The current status of the contract.
-
#status_details ⇒ Object
readonly
Information about the contract status transitions.
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_settings ⇒ Object (readonly)
The billing settings for the contract.
891 892 893 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 891 def billing_settings @billing_settings end |
#contract_line_details ⇒ Object (readonly)
The contract line details of the contract. Only populated when ‘contract_line_details` is passed in the `include` parameter.
893 894 895 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 893 def contract_line_details @contract_line_details end |
#contract_number ⇒ Object (readonly)
A unique user-provided contract number e.g. C-2026-0001.
895 896 897 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 895 def contract_number @contract_number end |
#contract_value_details ⇒ Object (readonly)
The computed total value of all contract lines.
897 898 899 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 897 def contract_value_details @contract_value_details end |
#created ⇒ Object (readonly)
Timestamp of when the object was created.
899 900 901 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 899 def created @created end |
#currency ⇒ Object (readonly)
The currency of the contract.
901 902 903 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 901 def currency @currency end |
#customer ⇒ Object (readonly)
The ID of the customer associated with the contract.
903 904 905 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 903 def customer @customer end |
#id ⇒ Object (readonly)
The ID of the contract object.
905 906 907 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 905 def id @id end |
#license_quantities ⇒ Object (readonly)
The license quantities of the contract. Only populated when ‘license_quantities` is passed in the `include` parameter.
907 908 909 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 907 def license_quantities @license_quantities 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.
909 910 911 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 909 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of key-value pairs that you can attach to an object.
911 912 913 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 911 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.
913 914 915 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 913 def object @object end |
#one_time_fees ⇒ Object (readonly)
The one-time fees of the contract. Only populated when ‘one_time_fees` is passed in the `include` parameter.
915 916 917 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 915 def one_time_fees @one_time_fees end |
#pricing_lines ⇒ Object (readonly)
The pricing lines of the contract. Only populated when ‘pricing_lines` is passed in the `include` parameter.
917 918 919 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 917 def pricing_lines @pricing_lines end |
#pricing_overrides ⇒ Object (readonly)
The pricing overrides of the contract. Only populated when ‘pricing_overrides` is passed in the `include` parameter.
919 920 921 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 919 def pricing_overrides @pricing_overrides end |
#status ⇒ Object (readonly)
The current status of the contract.
921 922 923 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 921 def status @status end |
#status_details ⇒ Object (readonly)
Information about the contract status transitions.
923 924 925 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 923 def status_details @status_details end |
Class Method Details
.field_encodings ⇒ Object
942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 942 def self.field_encodings @field_encodings = { one_time_fees: { kind: :array, element: { kind: :object, fields: { bill_schedule: { kind: :array, element: { kind: :object, fields: { value: :int64_string } }, }, }, }, }, pricing_overrides: { kind: :array, element: { kind: :object, fields: { overwrite_price: { kind: :object, fields: { tiers: { kind: :array, element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, }, }, }, }, }, }, } end |
.field_remappings ⇒ Object
938 939 940 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 938 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
925 926 927 928 929 930 931 932 933 934 935 936 |
# File 'lib/stripe/resources/v2/billing/contract.rb', line 925 def self.inner_class_types @inner_class_types = { billing_settings: BillingSettings, contract_line_details: ContractLineDetail, contract_value_details: ContractValueDetails, license_quantities: LicenseQuantity, one_time_fees: OneTimeFee, pricing_lines: PricingLine, pricing_overrides: PricingOverride, status_details: StatusDetails, } 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 |