Class: Orb::Models::UsageDiscount
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::UsageDiscount
- Defined in:
- lib/orb/models/usage_discount.rb
Defined Under Namespace
Modules: DiscountType
Instance Attribute Summary collapse
-
#applies_to_price_ids ⇒ Array<String>?
List of price_ids that this discount applies to.
- #discount_type ⇒ Symbol, Orb::Models::UsageDiscount::DiscountType
-
#filters ⇒ Array<Orb::Models::TransformPriceFilter>?
The filters that determine which prices to apply this discount to.
- #reason ⇒ String?
-
#usage_discount ⇒ Float
Only available if discount_type is ‘usage`.
Instance Method Summary collapse
-
#initialize(discount_type: , usage_discount: , applies_to_price_ids: nil, filters: nil, reason: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see UsageDiscount 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(discount_type: , usage_discount: , applies_to_price_ids: nil, filters: nil, reason: nil) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::UsageDiscount for more details.
|
|
# File 'lib/orb/models/usage_discount.rb', line 36
|
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.
23 |
# File 'lib/orb/models/usage_discount.rb', line 23 optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true |
#discount_type ⇒ Symbol, Orb::Models::UsageDiscount::DiscountType
9 |
# File 'lib/orb/models/usage_discount.rb', line 9 required :discount_type, enum: -> { Orb::UsageDiscount::DiscountType } |
#filters ⇒ Array<Orb::Models::TransformPriceFilter>?
The filters that determine which prices to apply this discount to.
29 |
# File 'lib/orb/models/usage_discount.rb', line 29 optional :filters, -> { Orb::Internal::Type::ArrayOf[Orb::TransformPriceFilter] }, nil?: true |
#reason ⇒ String?
34 |
# File 'lib/orb/models/usage_discount.rb', line 34 optional :reason, String, nil?: true |
#usage_discount ⇒ Float
Only available if discount_type is ‘usage`. Number of usage units that this discount is for
16 |
# File 'lib/orb/models/usage_discount.rb', line 16 required :usage_discount, Float |