Class: Dodopayments::Models::Price::RecurringPrice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Price::RecurringPrice
- Defined in:
- lib/dodopayments/models/price.rb,
sig/dodopayments/models/price.rbs
Instance Attribute Summary collapse
-
#currency ⇒ Symbol, Dodopayments::Models::Currency
The currency in which the payment is made.
- #discount ⇒ Integer? deprecated Deprecated.
-
#discount_bps ⇒ Integer?
Discount applied to the price, in basis points.
-
#payment_frequency_count ⇒ Integer
Number of units for the payment frequency.
-
#payment_frequency_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
The time interval for the payment frequency (e.g., day, month, year).
-
#price ⇒ Integer
The payment amount.
-
#purchasing_power_parity ⇒ Boolean?
Opts this price in to purchasing power parity.
-
#subscription_period_count ⇒ Integer
Number of units for the subscription period.
-
#subscription_period_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
The time interval for the subscription period (e.g., day, month, year).
-
#tax_inclusive ⇒ Boolean?
Indicates if the price is tax inclusive.
-
#trial_amount ⇒ Integer?
Amount charged today for a paid trial, in the price currency's minor units.
-
#trial_apply_discounts ⇒ Boolean?
Whether discount codes reduce the trial charge.
-
#trial_payment_method_optional ⇒ Boolean?
Let a customer start a free trial with no card.
-
#trial_period_days ⇒ Integer?
Number of days for the trial period.
- #type ⇒ Symbol, :recurring_price
-
#zero_amount_payment_method_optional ⇒ Boolean?
Let a customer start a subscription with no card, when the amount due today is
0(a native0price, or a 100% discount).
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #to_hash ⇒ {
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 ⇒ Object
137 |
# File 'sig/dodopayments/models/price.rbs', line 137
def initialize: (
|
Instance Attribute Details
#currency ⇒ Symbol, Dodopayments::Models::Currency
The currency in which the payment is made.
122 |
# File 'lib/dodopayments/models/price.rb', line 122 required :currency, enum: -> { Dodopayments::Currency } |
#discount ⇒ Integer?
Deprecated: use discount_bps instead.
Discount applied to the price, represented as a percentage (0 to 100). A
response rounds this value to the nearest whole percent. Defaults to 0.
171 |
# File 'lib/dodopayments/models/price.rb', line 171 optional :discount, Integer |
#discount_bps ⇒ Integer?
Discount applied to the price, in basis points. 100 basis points make one
percent, so 1250 is a discount of 12.5%.
Use this field for a discount with a fraction of a percent. A request that sends
this field ignores discount. A value of 0 gives no discount.
181 |
# File 'lib/dodopayments/models/price.rb', line 181 optional :discount_bps, Integer, nil?: true |
#payment_frequency_count ⇒ Integer
Number of units for the payment frequency. For example, a value of 1 with a
payment_frequency_interval of month represents monthly payments.
129 |
# File 'lib/dodopayments/models/price.rb', line 129 required :payment_frequency_count, Integer |
#payment_frequency_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
The time interval for the payment frequency (e.g., day, month, year).
135 |
# File 'lib/dodopayments/models/price.rb', line 135 required :payment_frequency_interval, enum: -> { Dodopayments::TimeInterval } |
#price ⇒ Integer
The payment amount. Represented in the lowest denomination of the currency
(e.g., cents for USD). For example, to charge $1.00, pass 100.
142 |
# File 'lib/dodopayments/models/price.rb', line 142 required :price, Integer |
#purchasing_power_parity ⇒ Boolean?
Opts this price in to purchasing power parity. The business must also enable
purchasing power parity. The discount percentage per country is always
business-wide. Defaults to false.
189 |
# File 'lib/dodopayments/models/price.rb', line 189 optional :purchasing_power_parity, Dodopayments::Internal::Type::Boolean |
#subscription_period_count ⇒ Integer
Number of units for the subscription period. For example, a value of 12 with a
subscription_period_interval of month represents a one-year subscription.
149 |
# File 'lib/dodopayments/models/price.rb', line 149 required :subscription_period_count, Integer |
#subscription_period_interval ⇒ Symbol, Dodopayments::Models::TimeInterval
The time interval for the subscription period (e.g., day, month, year).
155 |
# File 'lib/dodopayments/models/price.rb', line 155 required :subscription_period_interval, enum: -> { Dodopayments::TimeInterval } |
#tax_inclusive ⇒ Boolean?
Indicates if the price is tax inclusive
195 |
# File 'lib/dodopayments/models/price.rb', line 195 optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true |
#trial_amount ⇒ Integer?
Amount charged today for a paid trial, in the price currency's minor units.
Requires trial_period_days > 0. Omit or null for a free trial (the default).
202 |
# File 'lib/dodopayments/models/price.rb', line 202 optional :trial_amount, Integer, nil?: true |
#trial_apply_discounts ⇒ Boolean?
Whether discount codes reduce the trial charge. Defaults to false. Only meaningful when a paid trial is configured.
209 |
# File 'lib/dodopayments/models/price.rb', line 209 optional :trial_apply_discounts, Dodopayments::Internal::Type::Boolean, nil?: true |
#trial_payment_method_optional ⇒ Boolean?
Let a customer start a free trial with no card. Defaults to false.
215 |
# File 'lib/dodopayments/models/price.rb', line 215 optional :trial_payment_method_optional, Dodopayments::Internal::Type::Boolean |
#trial_period_days ⇒ Integer?
Number of days for the trial period. A value of 0 indicates no trial period.
221 |
# File 'lib/dodopayments/models/price.rb', line 221 optional :trial_period_days, Integer |
#type ⇒ Symbol, :recurring_price
160 |
# File 'lib/dodopayments/models/price.rb', line 160 required :type, const: :recurring_price |
#zero_amount_payment_method_optional ⇒ Boolean?
Let a customer start a subscription with no card, when the amount due today is
0 (a native 0 price, or a 100% discount). Defaults to false.
228 |
# File 'lib/dodopayments/models/price.rb', line 228 optional :zero_amount_payment_method_optional, Dodopayments::Internal::Type::Boolean |
Instance Method Details
#to_hash ⇒ {
156 |
# File 'sig/dodopayments/models/price.rbs', line 156
def to_hash: -> {
|