Class: Dodopayments::Models::Subscription
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Subscription
- Defined in:
- lib/dodopayments/models/subscription.rb
Overview
Direct Known Subclasses
Dodopayments::Models::SubscriptionActiveWebhookEvent::Data, Dodopayments::Models::SubscriptionCancelledWebhookEvent::Data, Dodopayments::Models::SubscriptionExpiredWebhookEvent::Data, Dodopayments::Models::SubscriptionFailedWebhookEvent::Data, Dodopayments::Models::SubscriptionOnHoldWebhookEvent::Data, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent::Data, Dodopayments::Models::SubscriptionRenewedWebhookEvent::Data, WebhookPayload::Data::Subscription
Defined Under Namespace
Classes: Meter
Instance Attribute Summary collapse
-
#addons ⇒ Array<Dodopayments::Models::AddonCartResponseItem>
Addons associated with this subscription.
-
#billing ⇒ Dodopayments::Models::BillingAddress
Billing address details for payments.
-
#cancel_at_next_billing_date ⇒ Boolean
Indicates if the subscription will cancel at the next billing date.
-
#cancelled_at ⇒ Time?
Cancelled timestamp if the subscription is cancelled.
-
#created_at ⇒ Time
Timestamp when the subscription was created.
-
#currency ⇒ Symbol, Dodopayments::Models::Currency
Currency used for the subscription payments.
-
#customer ⇒ Dodopayments::Models::CustomerLimitedDetails
Customer details associated with the subscription.
-
#discount_cycles_remaining ⇒ Integer?
Number of remaining discount cycles if discount is applied.
-
#discount_id ⇒ String?
The discount id if discount is applied.
-
#expires_at ⇒ Time?
Timestamp when the subscription will expire.
-
#metadata ⇒ Hash{Symbol=>String}
Additional custom data associated with the subscription.
-
#meters ⇒ Array<Dodopayments::Models::Subscription::Meter>
Meters associated with this subscription (for usage-based billing).
-
#next_billing_date ⇒ Time
Timestamp of the next scheduled billing.
-
#on_demand ⇒ Boolean
Wether the subscription is on-demand or not.
-
#payment_frequency_count ⇒ Integer
Number of payment frequency intervals.
-
#payment_frequency_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
Time interval for payment frequency (e.g. month, year).
-
#payment_method_id ⇒ String?
Saved payment method id used for recurring charges.
-
#previous_billing_date ⇒ Time
Timestamp of the last payment.
-
#product_id ⇒ String
Identifier of the product associated with this subscription.
-
#quantity ⇒ Integer
Number of units/items included in the subscription.
-
#recurring_pre_tax_amount ⇒ Integer
Amount charged before tax for each recurring payment in smallest currency unit (e.g. cents).
-
#status ⇒ Symbol, Dodopayments::Models::SubscriptionStatus
Current status of the subscription.
-
#subscription_id ⇒ String
Unique identifier for the subscription.
-
#subscription_period_count ⇒ Integer
Number of subscription period intervals.
-
#subscription_period_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
Time interval for the subscription period (e.g. month, year).
-
#tax_id ⇒ String?
Tax identifier provided for this subscription (if applicable).
-
#tax_inclusive ⇒ Boolean
Indicates if the recurring_pre_tax_amount is tax inclusive.
-
#trial_period_days ⇒ Integer
Number of days in the trial period (0 if no trial).
Method Summary
Methods inherited from Internal::Type::BaseModel
#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
This class inherits a constructor from Dodopayments::Internal::Type::BaseModel
Instance Attribute Details
#addons ⇒ Array<Dodopayments::Models::AddonCartResponseItem>
Addons associated with this subscription
11 |
# File 'lib/dodopayments/models/subscription.rb', line 11 required :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AddonCartResponseItem] } |
#billing ⇒ Dodopayments::Models::BillingAddress
Billing address details for payments
17 |
# File 'lib/dodopayments/models/subscription.rb', line 17 required :billing, -> { Dodopayments::BillingAddress } |
#cancel_at_next_billing_date ⇒ Boolean
Indicates if the subscription will cancel at the next billing date
23 |
# File 'lib/dodopayments/models/subscription.rb', line 23 required :cancel_at_next_billing_date, Dodopayments::Internal::Type::Boolean |
#cancelled_at ⇒ Time?
Cancelled timestamp if the subscription is cancelled
145 |
# File 'lib/dodopayments/models/subscription.rb', line 145 optional :cancelled_at, Time, nil?: true |
#created_at ⇒ Time
Timestamp when the subscription was created
29 |
# File 'lib/dodopayments/models/subscription.rb', line 29 required :created_at, Time |
#currency ⇒ Symbol, Dodopayments::Models::Currency
Currency used for the subscription payments
35 |
# File 'lib/dodopayments/models/subscription.rb', line 35 required :currency, enum: -> { Dodopayments::Currency } |
#customer ⇒ Dodopayments::Models::CustomerLimitedDetails
Customer details associated with the subscription
41 |
# File 'lib/dodopayments/models/subscription.rb', line 41 required :customer, -> { Dodopayments::CustomerLimitedDetails } |
#discount_cycles_remaining ⇒ Integer?
Number of remaining discount cycles if discount is applied
151 |
# File 'lib/dodopayments/models/subscription.rb', line 151 optional :discount_cycles_remaining, Integer, nil?: true |
#discount_id ⇒ String?
The discount id if discount is applied
157 |
# File 'lib/dodopayments/models/subscription.rb', line 157 optional :discount_id, String, nil?: true |
#expires_at ⇒ Time?
Timestamp when the subscription will expire
163 |
# File 'lib/dodopayments/models/subscription.rb', line 163 optional :expires_at, Time, nil?: true |
#metadata ⇒ Hash{Symbol=>String}
Additional custom data associated with the subscription
47 |
# File 'lib/dodopayments/models/subscription.rb', line 47 required :metadata, Dodopayments::Internal::Type::HashOf[String] |
#meters ⇒ Array<Dodopayments::Models::Subscription::Meter>
Meters associated with this subscription (for usage-based billing)
53 |
# File 'lib/dodopayments/models/subscription.rb', line 53 required :meters, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Subscription::Meter] } |
#next_billing_date ⇒ Time
Timestamp of the next scheduled billing. Indicates the end of current billing period
60 |
# File 'lib/dodopayments/models/subscription.rb', line 60 required :next_billing_date, Time |
#on_demand ⇒ Boolean
Wether the subscription is on-demand or not
66 |
# File 'lib/dodopayments/models/subscription.rb', line 66 required :on_demand, Dodopayments::Internal::Type::Boolean |
#payment_frequency_count ⇒ Integer
Number of payment frequency intervals
72 |
# File 'lib/dodopayments/models/subscription.rb', line 72 required :payment_frequency_count, Integer |
#payment_frequency_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
Time interval for payment frequency (e.g. month, year)
78 |
# File 'lib/dodopayments/models/subscription.rb', line 78 required :payment_frequency_interval, enum: -> { Dodopayments::TimeInterval } |
#payment_method_id ⇒ String?
Saved payment method id used for recurring charges
169 |
# File 'lib/dodopayments/models/subscription.rb', line 169 optional :payment_method_id, String, nil?: true |
#previous_billing_date ⇒ Time
Timestamp of the last payment. Indicates the start of current billing period
84 |
# File 'lib/dodopayments/models/subscription.rb', line 84 required :previous_billing_date, Time |
#product_id ⇒ String
Identifier of the product associated with this subscription
90 |
# File 'lib/dodopayments/models/subscription.rb', line 90 required :product_id, String |
#quantity ⇒ Integer
Number of units/items included in the subscription
96 |
# File 'lib/dodopayments/models/subscription.rb', line 96 required :quantity, Integer |
#recurring_pre_tax_amount ⇒ Integer
Amount charged before tax for each recurring payment in smallest currency unit (e.g. cents)
103 |
# File 'lib/dodopayments/models/subscription.rb', line 103 required :recurring_pre_tax_amount, Integer |
#status ⇒ Symbol, Dodopayments::Models::SubscriptionStatus
Current status of the subscription
109 |
# File 'lib/dodopayments/models/subscription.rb', line 109 required :status, enum: -> { Dodopayments::SubscriptionStatus } |
#subscription_id ⇒ String
Unique identifier for the subscription
115 |
# File 'lib/dodopayments/models/subscription.rb', line 115 required :subscription_id, String |
#subscription_period_count ⇒ Integer
Number of subscription period intervals
121 |
# File 'lib/dodopayments/models/subscription.rb', line 121 required :subscription_period_count, Integer |
#subscription_period_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
Time interval for the subscription period (e.g. month, year)
127 |
# File 'lib/dodopayments/models/subscription.rb', line 127 required :subscription_period_interval, enum: -> { Dodopayments::TimeInterval } |
#tax_id ⇒ String?
Tax identifier provided for this subscription (if applicable)
175 |
# File 'lib/dodopayments/models/subscription.rb', line 175 optional :tax_id, String, nil?: true |
#tax_inclusive ⇒ Boolean
Indicates if the recurring_pre_tax_amount is tax inclusive
133 |
# File 'lib/dodopayments/models/subscription.rb', line 133 required :tax_inclusive, Dodopayments::Internal::Type::Boolean |
#trial_period_days ⇒ Integer
Number of days in the trial period (0 if no trial)
139 |
# File 'lib/dodopayments/models/subscription.rb', line 139 required :trial_period_days, Integer |