Class: Orb::Models::Discount::TieredPercentage
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::Discount::TieredPercentage
- Defined in:
- lib/orb/models/discount.rb,
sig/orb/models/discount.rbs
Defined Under Namespace
Instance Attribute Summary collapse
-
#applies_to_price_ids ⇒ Array<String>?
List of price_ids that this discount applies to.
- #discount_type ⇒ Symbol, :tiered_percentage
-
#filters ⇒ Array<Orb::Models::Discount::TieredPercentage::Filter>?
The filters that determine which prices to apply this discount to.
- #reason ⇒ String?
-
#tiers ⇒ Array<Orb::Models::Discount::TieredPercentage::Tier>
Only available if discount_type is
tiered_percentage.
Instance Method Summary collapse
-
#initialize(lower_bound:, percentage:, upper_bound: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Tier 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(lower_bound:, percentage:, upper_bound: nil) ⇒ Object
Some parameter documentations has been truncated, see 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.
|
|
# File 'lib/orb/models/discount.rb', line 89
|
Instance Attribute Details
#applies_to_price_ids ⇒ Array<String>?
List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
39 |
# File 'lib/orb/models/discount.rb', line 39 optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true |
#discount_type ⇒ Symbol, :tiered_percentage
24 |
# File 'lib/orb/models/discount.rb', line 24 required :discount_type, const: :tiered_percentage |
#filters ⇒ Array<Orb::Models::Discount::TieredPercentage::Filter>?
The filters that determine which prices to apply this discount to.
45 46 47 |
# File 'lib/orb/models/discount.rb', line 45 optional :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Discount::TieredPercentage::Filter] }, nil?: true |
#reason ⇒ String?
52 |
# File 'lib/orb/models/discount.rb', line 52 optional :reason, String, nil?: true |
#tiers ⇒ Array<Orb::Models::Discount::TieredPercentage::Tier>
Only available if discount_type is tiered_percentage. The ordered, contiguous
bands of cumulative eligible spend, each discounted at its own percentage
(progressive fill-a-tier).
32 |
# File 'lib/orb/models/discount.rb', line 32 required :tiers, -> { Orb::Internal::Type::ArrayOf[Orb::Discount::TieredPercentage::Tier] } |
Instance Method Details
#to_hash ⇒ {
41 |
# File 'sig/orb/models/discount.rbs', line 41
def to_hash: -> {
|