Class: Orb::Models::DiscountOverride
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::DiscountOverride
- Defined in:
- lib/orb/models/discount_override.rb,
sig/orb/models/discount_override.rbs
Defined Under Namespace
Modules: DiscountType
Instance Attribute Summary collapse
-
#amount_discount ⇒ String?
Only available if discount_type is
amount. - #discount_type ⇒ Symbol, Orb::Models::DiscountOverride::DiscountType
-
#percentage_discount ⇒ Float?
Only available if discount_type is
percentage. -
#usage_discount ⇒ Float?
Only available if discount_type is
usage.
Instance Method Summary collapse
-
#initialize(discount_type:, amount_discount: nil, percentage_discount: nil, usage_discount: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see DiscountOverride 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(discount_type:, amount_discount: nil, percentage_discount: nil, usage_discount: nil) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::DiscountOverride for more details.
|
|
# File 'lib/orb/models/discount_override.rb', line 31
|
Instance Attribute Details
#amount_discount ⇒ String?
Only available if discount_type is amount.
15 |
# File 'lib/orb/models/discount_override.rb', line 15 optional :amount_discount, String, nil?: true |
#discount_type ⇒ Symbol, Orb::Models::DiscountOverride::DiscountType
9 |
# File 'lib/orb/models/discount_override.rb', line 9 required :discount_type, enum: -> { Orb::DiscountOverride::DiscountType } |
#percentage_discount ⇒ Float?
Only available if discount_type is percentage. This is a number between 0
and 1.
22 |
# File 'lib/orb/models/discount_override.rb', line 22 optional :percentage_discount, Float, nil?: true |
#usage_discount ⇒ Float?
Only available if discount_type is usage. Number of usage units that this
discount is for
29 |
# File 'lib/orb/models/discount_override.rb', line 29 optional :usage_discount, Float, nil?: true |
Instance Method Details
#to_hash ⇒ {
27 |
# File 'sig/orb/models/discount_override.rbs', line 27
def to_hash: -> {
|