Class: Stripe::V2::Billing::Cadence
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Billing::Cadence
- Defined in:
- lib/stripe/resources/v2/billing/cadence.rb
Overview
A Cadence represents a billing schedule applied to a customer, defining when and how often to generate invoices, such as on monthly or annual billing cycle.
Defined Under Namespace
Classes: BillingCycle, InvoiceDiscountRule, Payer, Settings, SettingsData
Constant Summary collapse
- OBJECT_NAME =
"v2.billing.cadence"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#billing_cycle ⇒ Object
readonly
The billing cycle is the object that defines future billing cycle dates.
-
#created ⇒ Object
readonly
Timestamp of when the object was created.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#invoice_discount_rules ⇒ Object
readonly
The discount rules applied to all invoices for the cadence.
-
#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.
-
#lookup_key ⇒ Object
readonly
A lookup key used to retrieve cadences dynamically from a static string.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](/docs/api/metadata) that you can attach to an object.
-
#next_billing_date ⇒ Object
readonly
The date that the billing cadence will next bill.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#payer ⇒ Object
readonly
The payer determines the entity financially responsible for the bill.
-
#settings ⇒ Object
readonly
The settings associated with the cadence.
-
#settings_data ⇒ Object
readonly
Settings data that contains expanded billing settings configuration with actual values.
-
#status ⇒ Object
readonly
The current status of the cadence.
-
#test_clock ⇒ Object
readonly
The ID of the Test Clock.
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 ⇒ Object (readonly)
The billing cycle is the object that defines future billing cycle dates.
674 675 676 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 674 def billing_cycle @billing_cycle end |
#created ⇒ Object (readonly)
Timestamp of when the object was created.
676 677 678 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 676 def created @created end |
#id ⇒ Object (readonly)
Unique identifier for the object.
678 679 680 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 678 def id @id end |
#invoice_discount_rules ⇒ Object (readonly)
The discount rules applied to all invoices for the cadence.
680 681 682 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 680 def invoice_discount_rules @invoice_discount_rules 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.
700 701 702 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 700 def livemode @livemode end |
#lookup_key ⇒ Object (readonly)
A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters.
682 683 684 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 682 def lookup_key @lookup_key end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
684 685 686 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 684 def @metadata end |
#next_billing_date ⇒ Object (readonly)
The date that the billing cadence will next bill. Null if the cadence is not active.
686 687 688 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 686 def next_billing_date @next_billing_date end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value of the object field.
688 689 690 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 688 def object @object end |
#payer ⇒ Object (readonly)
The payer determines the entity financially responsible for the bill.
690 691 692 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 690 def payer @payer end |
#settings ⇒ Object (readonly)
The settings associated with the cadence.
692 693 694 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 692 def settings @settings end |
#settings_data ⇒ Object (readonly)
Settings data that contains expanded billing settings configuration with actual values.
694 695 696 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 694 def settings_data @settings_data end |
#status ⇒ Object (readonly)
The current status of the cadence.
696 697 698 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 696 def status @status end |
#test_clock ⇒ Object (readonly)
The ID of the Test Clock.
698 699 700 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 698 def test_clock @test_clock end |
Class Method Details
.field_encodings ⇒ Object
716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 716 def self.field_encodings @field_encodings = { invoice_discount_rules: { kind: :array, element: { kind: :object, fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } }, }, }, settings_data: { kind: :object, fields: { collection: { kind: :object, fields: { payment_method_options: { kind: :object, fields: { card: { kind: :object, fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } }, }, }, }, }, }, }, }, }, } end |
.field_remappings ⇒ Object
712 713 714 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 712 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
702 703 704 705 706 707 708 709 710 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 702 def self.inner_class_types @inner_class_types = { billing_cycle: BillingCycle, invoice_discount_rules: InvoiceDiscountRule, payer: Payer, settings: Settings, settings_data: SettingsData, } end |
.object_name ⇒ Object
10 11 12 |
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 10 def self.object_name "v2.billing.cadence" end |