Class: Stripe::V2::Billing::Cadence

Inherits:
APIResource show all
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, Payer, Settings, SettingsData

Constant Summary collapse

OBJECT_NAME =
"v2.billing.cadence"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

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

included

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_cycleObject (readonly)

The billing cycle is the object that defines future billing cycle dates.



621
622
623
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 621

def billing_cycle
  @billing_cycle
end

#createdObject (readonly)

Timestamp of when the object was created.



623
624
625
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 623

def created
  @created
end

#idObject (readonly)

Unique identifier for the object.



625
626
627
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 625

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



627
628
629
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 627

def livemode
  @livemode
end

#lookup_keyObject (readonly)

A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters.



629
630
631
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 629

def lookup_key
  @lookup_key
end

#metadataObject (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.



631
632
633
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 631

def 
  @metadata
end

#next_billing_dateObject (readonly)

The date that the billing cadence will next bill. Null if the cadence is not active.



633
634
635
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 633

def next_billing_date
  @next_billing_date
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value of the object field.



635
636
637
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 635

def object
  @object
end

#payerObject (readonly)

The payer determines the entity financially responsible for the bill.



637
638
639
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 637

def payer
  @payer
end

#settingsObject (readonly)

The settings associated with the cadence.



639
640
641
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 639

def settings
  @settings
end

#settings_dataObject (readonly)

Settings data that contains expanded billing settings configuration with actual values.



641
642
643
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 641

def settings_data
  @settings_data
end

#statusObject (readonly)

The current status of the cadence.



643
644
645
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 643

def status
  @status
end

#test_clockObject (readonly)

The ID of the Test Clock.



645
646
647
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 645

def test_clock
  @test_clock
end

Class Method Details

.field_encodingsObject



660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 660

def self.field_encodings
  @field_encodings = {
    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_remappingsObject



656
657
658
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 656

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



647
648
649
650
651
652
653
654
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 647

def self.inner_class_types
  @inner_class_types = {
    billing_cycle: BillingCycle,
    payer: Payer,
    settings: Settings,
    settings_data: SettingsData,
  }
end

.object_nameObject



10
11
12
# File 'lib/stripe/resources/v2/billing/cadence.rb', line 10

def self.object_name
  "v2.billing.cadence"
end