Class: Dodopayments::Models::Price::RecurringPrice

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/price.rb

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

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(currency: , discount: , payment_frequency_count: , payment_frequency_interval: , price: , purchasing_power_parity: , subscription_period_count: , subscription_period_interval: , type: , tax_inclusive: nil, trial_period_days: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::Price::RecurringPrice for more details.

Recurring price details.

Parameters:

  • currency (Symbol, Dodopayments::Models::Currency) (defaults to: )

    The currency in which the payment is made.

  • discount (Integer) (defaults to: )

    Discount applied to the price, represented as a percentage (0 to 100).

  • payment_frequency_count (Integer) (defaults to: )

    Number of units for the payment frequency.

  • payment_frequency_interval (Symbol, Dodopayments::Models::TimeInterval) (defaults to: )

    The time interval for the payment frequency (e.g., day, month, year).

  • price (Integer) (defaults to: )

    The payment amount. Represented in the lowest denomination of the currency (e.g.

  • purchasing_power_parity (Boolean) (defaults to: )

    Indicates if purchasing power parity adjustments are applied to the price.

  • subscription_period_count (Integer) (defaults to: )

    Number of units for the subscription period.

  • subscription_period_interval (Symbol, Dodopayments::Models::TimeInterval) (defaults to: )

    The time interval for the subscription period (e.g., day, month, year).

  • type (Symbol, Dodopayments::Models::Price::RecurringPrice::Type) (defaults to: )
  • tax_inclusive (Boolean, nil) (defaults to: nil)

    Indicates if the price is tax inclusive

  • trial_period_days (Integer) (defaults to: nil)

    Number of days for the trial period. A value of ‘0` indicates no trial period.



# File 'lib/dodopayments/models/price.rb', line 177


Instance Attribute Details

#currencySymbol, Dodopayments::Models::Currency

The currency in which the payment is made.

Returns:



112
# File 'lib/dodopayments/models/price.rb', line 112

required :currency, enum: -> { Dodopayments::Currency }

#discountInteger

Discount applied to the price, represented as a percentage (0 to 100).

Returns:

  • (Integer)


118
# File 'lib/dodopayments/models/price.rb', line 118

required :discount, Integer

#payment_frequency_countInteger

Number of units for the payment frequency. For example, a value of ‘1` with a `payment_frequency_interval` of `month` represents monthly payments.

Returns:

  • (Integer)


125
# File 'lib/dodopayments/models/price.rb', line 125

required :payment_frequency_count, Integer

#payment_frequency_intervalSymbol, Dodopayments::Models::TimeInterval

The time interval for the payment frequency (e.g., day, month, year).



131
# File 'lib/dodopayments/models/price.rb', line 131

required :payment_frequency_interval, enum: -> { Dodopayments::TimeInterval }

#priceInteger

The payment amount. Represented in the lowest denomination of the currency (e.g., cents for USD). For example, to charge $1.00, pass ‘100`.

Returns:

  • (Integer)


138
# File 'lib/dodopayments/models/price.rb', line 138

required :price, Integer

#purchasing_power_parityBoolean

Indicates if purchasing power parity adjustments are applied to the price. Purchasing power parity feature is not available as of now

Returns:

  • (Boolean)


145
# File 'lib/dodopayments/models/price.rb', line 145

required :purchasing_power_parity, Dodopayments::Internal::Type::Boolean

#subscription_period_countInteger

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.

Returns:

  • (Integer)


152
# File 'lib/dodopayments/models/price.rb', line 152

required :subscription_period_count, Integer

#subscription_period_intervalSymbol, Dodopayments::Models::TimeInterval

The time interval for the subscription period (e.g., day, month, year).



158
# File 'lib/dodopayments/models/price.rb', line 158

required :subscription_period_interval, enum: -> { Dodopayments::TimeInterval }

#tax_inclusiveBoolean?

Indicates if the price is tax inclusive

Returns:

  • (Boolean, nil)


169
# File 'lib/dodopayments/models/price.rb', line 169

optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true

#trial_period_daysInteger?

Number of days for the trial period. A value of ‘0` indicates no trial period.

Returns:

  • (Integer, nil)


175
# File 'lib/dodopayments/models/price.rb', line 175

optional :trial_period_days, Integer

#typeSymbol, Dodopayments::Models::Price::RecurringPrice::Type



163
# File 'lib/dodopayments/models/price.rb', line 163

required :type, enum: -> { Dodopayments::Price::RecurringPrice::Type }