Class: Orb::Models::InvoiceLevelDiscount::TieredPercentage::Tier
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::InvoiceLevelDiscount::TieredPercentage::Tier
- Defined in:
- lib/orb/models/invoice_level_discount.rb,
sig/orb/models/invoice_level_discount.rbs
Instance Attribute Summary collapse
-
#lower_bound ⇒ Float
Exclusive lower bound of cumulative spend for this tier.
-
#percentage ⇒ Float
The percentage (between 0 and 1) discounted from spend that falls within this tier.
-
#upper_bound ⇒ Float?
Inclusive upper bound of cumulative spend for this tier; null for the final open-ended tier.
Instance Method Summary collapse
-
#initialize(tiers:, applies_to_price_ids: nil, filters: nil, reason: nil, discount_type: :tiered_percentage) ⇒ Object
constructor
Some parameter documentations has been truncated, see Orb::Models::InvoiceLevelDiscount::TieredPercentage 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(tiers:, applies_to_price_ids: nil, filters: nil, reason: nil, discount_type: :tiered_percentage) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::InvoiceLevelDiscount::TieredPercentage for more details.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/orb/models/invoice_level_discount.rb', line 66 class Tier < Orb::Internal::Type::BaseModel # @!attribute lower_bound # Exclusive lower bound of cumulative spend for this tier. # # @return [Float] required :lower_bound, Float # @!attribute percentage # The percentage (between 0 and 1) discounted from spend that falls within this # tier. # # @return [Float] required :percentage, Float # @!attribute upper_bound # Inclusive upper bound of cumulative spend for this tier; null for the final # open-ended tier. # # @return [Float, nil] optional :upper_bound, Float, nil?: true # @!method initialize(lower_bound:, percentage:, upper_bound: nil) # Some parameter documentations has been truncated, see # {Orb::Models::InvoiceLevelDiscount::TieredPercentage::Tier} for more details. # # One band of a tiered percentage discount. Bounds are denominated in the # discount's currency. `lower_bound` is the exclusive start of the band and # `upper_bound` is the inclusive end; `upper_bound` is null only for the # open-ended final tier. # # @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier. # # @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti # # @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open end |
Instance Attribute Details
#lower_bound ⇒ Float
Exclusive lower bound of cumulative spend for this tier.
71 |
# File 'lib/orb/models/invoice_level_discount.rb', line 71 required :lower_bound, Float |
#percentage ⇒ Float
The percentage (between 0 and 1) discounted from spend that falls within this tier.
78 |
# File 'lib/orb/models/invoice_level_discount.rb', line 78 required :percentage, Float |
#upper_bound ⇒ Float?
Inclusive upper bound of cumulative spend for this tier; null for the final open-ended tier.
85 |
# File 'lib/orb/models/invoice_level_discount.rb', line 85 optional :upper_bound, Float, nil?: true |
Instance Method Details
#to_hash ⇒ {
64 |
# File 'sig/orb/models/invoice_level_discount.rbs', line 64 def to_hash: -> { |