Class: Dodopayments::Models::Price::OneTimePrice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Price::OneTimePrice
- Defined in:
- lib/dodopayments/models/price.rb
Defined Under Namespace
Modules: Type
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, Dodopayments::Models::Price::OneTimePrice::Type
Instance Method Summary collapse
-
#initialize(currency: , discount: , price: , purchasing_power_parity: , type: , pay_what_you_want: nil, suggested_price: nil, tax_inclusive: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see OneTimePrice for more details.
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: , price: , purchasing_power_parity: , type: , pay_what_you_want: nil, suggested_price: nil, tax_inclusive: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::Price::OneTimePrice for more details.
One-time price details.
|
|
# File 'lib/dodopayments/models/price.rb', line 74
|
Instance Attribute Details
#currency ⇒ Symbol, Dodopayments::Models::Currency
The currency in which the payment is made.
23 |
# File 'lib/dodopayments/models/price.rb', line 23 required :currency, enum: -> { Dodopayments::Currency } |
#discount ⇒ Integer
Discount applied to the price, represented as a percentage (0 to 100).
29 |
# File 'lib/dodopayments/models/price.rb', line 29 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.
58 |
# File 'lib/dodopayments/models/price.rb', line 58 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.
39 |
# File 'lib/dodopayments/models/price.rb', line 39 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.
46 |
# File 'lib/dodopayments/models/price.rb', line 46 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.
66 |
# File 'lib/dodopayments/models/price.rb', line 66 optional :suggested_price, Integer, nil?: true |
#tax_inclusive ⇒ Boolean?
Indicates if the price is tax inclusive.
72 |
# File 'lib/dodopayments/models/price.rb', line 72 optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true |
#type ⇒ Symbol, Dodopayments::Models::Price::OneTimePrice::Type
51 |
# File 'lib/dodopayments/models/price.rb', line 51 required :type, enum: -> { Dodopayments::Price::OneTimePrice::Type } |