Class: Dodopayments::Models::Discount::CurrencyOption
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Discount::CurrencyOption
- Defined in:
- lib/dodopayments/models/discount.rb,
sig/dodopayments/models/discount.rbs
Instance Attribute Summary collapse
-
#currency ⇒ Symbol, Dodopayments::Models::Currency
The currency this option applies to.
-
#is_default ⇒ Boolean
Whether this is the default row FX conversions pivot from.
-
#max_amount_possible ⇒ Integer?
The most this code discounts in this currency's subunits (flat deduction or percentage cap).
-
#minimum_subtotal ⇒ Integer
Eligible-cart threshold in this currency's subunits (0 = no minimum).
Instance Method Summary collapse
-
#initialize(currency:, is_default:, minimum_subtotal:, max_amount_possible: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see CurrencyOption for more details.
- #to_hash ⇒ {
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:, is_default:, minimum_subtotal:, max_amount_possible: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::Discount::CurrencyOption for more details.
A per-currency discount option (response shape). max_amount_possible mirrors
the DB column of the same name.
|
|
# File 'lib/dodopayments/models/discount.rb', line 202
|
Instance Attribute Details
#currency ⇒ Symbol, Dodopayments::Models::Currency
The currency this option applies to.
181 |
# File 'lib/dodopayments/models/discount.rb', line 181 required :currency, enum: -> { Dodopayments::Currency } |
#is_default ⇒ Boolean
Whether this is the default row FX conversions pivot from.
187 |
# File 'lib/dodopayments/models/discount.rb', line 187 required :is_default, Dodopayments::Internal::Type::Boolean |
#max_amount_possible ⇒ Integer?
The most this code discounts in this currency's subunits (flat deduction or percentage cap).
200 |
# File 'lib/dodopayments/models/discount.rb', line 200 optional :max_amount_possible, Integer, nil?: true |
#minimum_subtotal ⇒ Integer
Eligible-cart threshold in this currency's subunits (0 = no minimum).
193 |
# File 'lib/dodopayments/models/discount.rb', line 193 required :minimum_subtotal, Integer |
Instance Method Details
#to_hash ⇒ {
145 |
# File 'sig/dodopayments/models/discount.rbs', line 145
def to_hash: -> {
|