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
Defined Under Namespace
Classes: ScheduledChange
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.
-
#credit_entitlement_cart ⇒ Array<Dodopayments::Models::CreditEntitlementCartResponse>
Credit entitlement cart settings for this subscription.
-
#currency ⇒ Symbol, Dodopayments::Models::Currency
Currency used for the subscription payments.
-
#custom_field_responses ⇒ Array<Dodopayments::Models::CustomFieldResponse>?
Customer’s responses to custom fields collected during checkout.
-
#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.
-
#meter_credit_entitlement_cart ⇒ Array<Dodopayments::Models::MeterCreditEntitlementCartResponse>
Meter credit entitlement cart settings for this subscription.
-
#meters ⇒ Array<Dodopayments::Models::MeterCartResponseItem>
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).
-
#scheduled_change ⇒ Dodopayments::Models::Subscription::ScheduledChange?
Scheduled plan change details, if any.
-
#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).
Instance Method Summary collapse
-
#initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, credit_entitlement_cart:, currency:, customer:, metadata:, meter_credit_entitlement_cart:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, custom_field_responses: nil, discount_cycles_remaining: nil, discount_id: nil, expires_at: nil, payment_method_id: nil, scheduled_change: nil, tax_id: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Subscription for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, 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
#initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, credit_entitlement_cart:, currency:, customer:, metadata:, meter_credit_entitlement_cart:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, custom_field_responses: nil, discount_cycles_remaining: nil, discount_id: nil, expires_at: nil, payment_method_id: nil, scheduled_change: nil, tax_id: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::Subscription for more details.
Response struct representing subscription details
|
|
# File 'lib/dodopayments/models/subscription.rb', line 205
|
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
159 |
# File 'lib/dodopayments/models/subscription.rb', line 159 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 |
#credit_entitlement_cart ⇒ Array<Dodopayments::Models::CreditEntitlementCartResponse>
Credit entitlement cart settings for this subscription
35 36 |
# File 'lib/dodopayments/models/subscription.rb', line 35 required :credit_entitlement_cart, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::CreditEntitlementCartResponse] } |
#currency ⇒ Symbol, Dodopayments::Models::Currency
Currency used for the subscription payments
42 |
# File 'lib/dodopayments/models/subscription.rb', line 42 required :currency, enum: -> { Dodopayments::Currency } |
#custom_field_responses ⇒ Array<Dodopayments::Models::CustomFieldResponse>?
Customer’s responses to custom fields collected during checkout
165 166 167 |
# File 'lib/dodopayments/models/subscription.rb', line 165 optional :custom_field_responses, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::CustomFieldResponse] }, nil?: true |
#customer ⇒ Dodopayments::Models::CustomerLimitedDetails
Customer details associated with the subscription
48 |
# File 'lib/dodopayments/models/subscription.rb', line 48 required :customer, -> { Dodopayments::CustomerLimitedDetails } |
#discount_cycles_remaining ⇒ Integer?
Number of remaining discount cycles if discount is applied
173 |
# File 'lib/dodopayments/models/subscription.rb', line 173 optional :discount_cycles_remaining, Integer, nil?: true |
#discount_id ⇒ String?
The discount id if discount is applied
179 |
# File 'lib/dodopayments/models/subscription.rb', line 179 optional :discount_id, String, nil?: true |
#expires_at ⇒ Time?
Timestamp when the subscription will expire
185 |
# File 'lib/dodopayments/models/subscription.rb', line 185 optional :expires_at, Time, nil?: true |
#metadata ⇒ Hash{Symbol=>String}
Additional custom data associated with the subscription
54 |
# File 'lib/dodopayments/models/subscription.rb', line 54 required :metadata, Dodopayments::Internal::Type::HashOf[String] |
#meter_credit_entitlement_cart ⇒ Array<Dodopayments::Models::MeterCreditEntitlementCartResponse>
Meter credit entitlement cart settings for this subscription
60 61 |
# File 'lib/dodopayments/models/subscription.rb', line 60 required :meter_credit_entitlement_cart, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::MeterCreditEntitlementCartResponse] } |
#meters ⇒ Array<Dodopayments::Models::MeterCartResponseItem>
Meters associated with this subscription (for usage-based billing)
67 |
# File 'lib/dodopayments/models/subscription.rb', line 67 required :meters, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::MeterCartResponseItem] } |
#next_billing_date ⇒ Time
Timestamp of the next scheduled billing. Indicates the end of current billing period
74 |
# File 'lib/dodopayments/models/subscription.rb', line 74 required :next_billing_date, Time |
#on_demand ⇒ Boolean
Wether the subscription is on-demand or not
80 |
# File 'lib/dodopayments/models/subscription.rb', line 80 required :on_demand, Dodopayments::Internal::Type::Boolean |
#payment_frequency_count ⇒ Integer
Number of payment frequency intervals
86 |
# File 'lib/dodopayments/models/subscription.rb', line 86 required :payment_frequency_count, Integer |
#payment_frequency_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
Time interval for payment frequency (e.g. month, year)
92 |
# File 'lib/dodopayments/models/subscription.rb', line 92 required :payment_frequency_interval, enum: -> { Dodopayments::TimeInterval } |
#payment_method_id ⇒ String?
Saved payment method id used for recurring charges
191 |
# File 'lib/dodopayments/models/subscription.rb', line 191 optional :payment_method_id, String, nil?: true |
#previous_billing_date ⇒ Time
Timestamp of the last payment. Indicates the start of current billing period
98 |
# File 'lib/dodopayments/models/subscription.rb', line 98 required :previous_billing_date, Time |
#product_id ⇒ String
Identifier of the product associated with this subscription
104 |
# File 'lib/dodopayments/models/subscription.rb', line 104 required :product_id, String |
#quantity ⇒ Integer
Number of units/items included in the subscription
110 |
# File 'lib/dodopayments/models/subscription.rb', line 110 required :quantity, Integer |
#recurring_pre_tax_amount ⇒ Integer
Amount charged before tax for each recurring payment in smallest currency unit (e.g. cents)
117 |
# File 'lib/dodopayments/models/subscription.rb', line 117 required :recurring_pre_tax_amount, Integer |
#scheduled_change ⇒ Dodopayments::Models::Subscription::ScheduledChange?
Scheduled plan change details, if any
197 |
# File 'lib/dodopayments/models/subscription.rb', line 197 optional :scheduled_change, -> { Dodopayments::Subscription::ScheduledChange }, nil?: true |
#status ⇒ Symbol, Dodopayments::Models::SubscriptionStatus
Current status of the subscription
123 |
# File 'lib/dodopayments/models/subscription.rb', line 123 required :status, enum: -> { Dodopayments::SubscriptionStatus } |
#subscription_id ⇒ String
Unique identifier for the subscription
129 |
# File 'lib/dodopayments/models/subscription.rb', line 129 required :subscription_id, String |
#subscription_period_count ⇒ Integer
Number of subscription period intervals
135 |
# File 'lib/dodopayments/models/subscription.rb', line 135 required :subscription_period_count, Integer |
#subscription_period_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
Time interval for the subscription period (e.g. month, year)
141 |
# File 'lib/dodopayments/models/subscription.rb', line 141 required :subscription_period_interval, enum: -> { Dodopayments::TimeInterval } |
#tax_id ⇒ String?
Tax identifier provided for this subscription (if applicable)
203 |
# File 'lib/dodopayments/models/subscription.rb', line 203 optional :tax_id, String, nil?: true |
#tax_inclusive ⇒ Boolean
Indicates if the recurring_pre_tax_amount is tax inclusive
147 |
# File 'lib/dodopayments/models/subscription.rb', line 147 required :tax_inclusive, Dodopayments::Internal::Type::Boolean |
#trial_period_days ⇒ Integer
Number of days in the trial period (0 if no trial)
153 |
# File 'lib/dodopayments/models/subscription.rb', line 153 required :trial_period_days, Integer |