Class: Dodopayments::Models::Price::OneTimePrice

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

Instance Attribute Summary collapse

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

#currencySymbol, Dodopayments::Models::Currency

The currency in which the payment is made.

Returns:



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

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

#discountInteger

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

Returns:

  • (Integer)


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

required :discount, Integer

#pay_what_you_wantBoolean?

Indicates whether the customer can pay any amount they choose. If set to ‘true`, the [`price`](Self::price) field is the minimum amount.

Returns:

  • (Boolean, nil)


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

optional :pay_what_you_want, Dodopayments::Internal::Type::Boolean

#priceInteger

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

If [‘pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field represents the minimum amount the customer must pay.

Returns:

  • (Integer)


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

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)


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

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

#suggested_priceInteger?

A suggested price for the user to pay. This value is only considered if [‘pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is ignored.

Returns:

  • (Integer, nil)


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

optional :suggested_price, Integer, nil?: true

#tax_inclusiveBoolean?

Indicates if the price is tax inclusive.

Returns:

  • (Boolean, nil)


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

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

#typeSymbol, :one_time_price

Returns:

  • (Symbol, :one_time_price)


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

required :type, const: :one_time_price