Module: Dodopayments::Models::Price

Extended by:
Internal::Type::Union
Defined in:
lib/dodopayments/models/price.rb

Overview

One-time price details.

Defined Under Namespace

Classes: OneTimePrice, RecurringPrice, UsageBasedPrice

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, dump, hash, inspect, to_sorbet_type, variants

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Instance Method Details

#initialize(currency:, discount:, payment_frequency_count:, payment_frequency_interval:, price:, purchasing_power_parity:, subscription_period_count:, subscription_period_interval:, tax_inclusive: nil, trial_period_days: nil, type: :recurring_price) ⇒ Object

Some parameter documentations has been truncated, see RecurringPrice for more details.

Recurring price details.

Parameters:

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

    The currency in which the payment is made.

  • discount (Integer)

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

  • 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. Represented in the lowest denomination of the currency (e.g.

  • purchasing_power_parity (Boolean)

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

  • 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, 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.

  • type (Symbol, :recurring_price) (defaults to: :recurring_price)


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