Class: Dodopayments::Models::Price::OneTimePrice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Price::OneTimePrice
- Defined in:
- lib/dodopayments/models/price.rb
Instance Attribute Summary collapse
-
#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).
-
#pay_what_you_want ⇒ Boolean?
Indicates whether the customer can pay any amount they choose.
-
#price ⇒ Integer
The payment amount, in the smallest denomination of the currency (e.g., cents for USD).
-
#purchasing_power_parity ⇒ Boolean
Indicates if purchasing power parity adjustments are applied to the price.
-
#suggested_price ⇒ Integer?
A suggested price for the user to pay.
-
#tax_inclusive ⇒ Boolean?
Indicates if the price is tax inclusive.
- #type ⇒ Symbol, :one_time_price
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
#currency ⇒ Symbol, Dodopayments::Models::Currency
The currency in which the payment is made.
25 |
# File 'lib/dodopayments/models/price.rb', line 25 required :currency, enum: -> { Dodopayments::Currency } |
#discount ⇒ Integer
Discount applied to the price, represented as a percentage (0 to 100).
31 |
# File 'lib/dodopayments/models/price.rb', line 31 required :discount, Integer |
#pay_what_you_want ⇒ Boolean?
Indicates whether the customer can pay any amount they choose. If set to ‘true`, the [`price`](Self::price) field is the minimum amount.
60 |
# File 'lib/dodopayments/models/price.rb', line 60 optional :pay_what_you_want, Dodopayments::Internal::Type::Boolean |
#price ⇒ Integer
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.
41 |
# File 'lib/dodopayments/models/price.rb', line 41 required :price, Integer |
#purchasing_power_parity ⇒ Boolean
Indicates if purchasing power parity adjustments are applied to the price. Purchasing power parity feature is not available as of now.
48 |
# File 'lib/dodopayments/models/price.rb', line 48 required :purchasing_power_parity, Dodopayments::Internal::Type::Boolean |
#suggested_price ⇒ Integer?
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.
68 |
# File 'lib/dodopayments/models/price.rb', line 68 optional :suggested_price, Integer, nil?: true |
#tax_inclusive ⇒ Boolean?
Indicates if the price is tax inclusive.
74 |
# File 'lib/dodopayments/models/price.rb', line 74 optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true |
#type ⇒ Symbol, :one_time_price
53 |
# File 'lib/dodopayments/models/price.rb', line 53 required :type, const: :one_time_price |