Class: Orb::Models::NewUsageDiscount
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::NewUsageDiscount
- Defined in:
- lib/orb/models/new_usage_discount.rb
Defined Under Namespace
Modules: AdjustmentType, AppliesToAll, PriceType
Instance Attribute Summary collapse
- #adjustment_type ⇒ Symbol, Orb::Models::NewUsageDiscount::AdjustmentType
-
#applies_to_all ⇒ Boolean, ...
If set, the adjustment will apply to every price on the subscription.
-
#applies_to_item_ids ⇒ Array<String>?
The set of item IDs to which this adjustment applies.
-
#applies_to_price_ids ⇒ Array<String>?
The set of price IDs to which this adjustment applies.
-
#currency ⇒ String?
If set, only prices in the specified currency will have the adjustment applied.
-
#filters ⇒ Array<Orb::Models::TransformPriceFilter>?
A list of filters that determine which prices this adjustment will apply to.
-
#is_invoice_level ⇒ Boolean?
When false, this adjustment will be applied to a single price.
-
#price_type ⇒ Symbol, ...
If set, only prices of the specified type will have the adjustment applied.
- #usage_discount ⇒ Float
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(adjustment_type: , usage_discount: , applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see NewUsageDiscount 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(adjustment_type: , usage_discount: , applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::NewUsageDiscount for more details.
|
|
# File 'lib/orb/models/new_usage_discount.rb', line 59
|
Instance Attribute Details
#adjustment_type ⇒ Symbol, Orb::Models::NewUsageDiscount::AdjustmentType
9 |
# File 'lib/orb/models/new_usage_discount.rb', line 9 required :adjustment_type, enum: -> { Orb::NewUsageDiscount::AdjustmentType } |
#applies_to_all ⇒ Boolean, ...
If set, the adjustment will apply to every price on the subscription.
20 |
# File 'lib/orb/models/new_usage_discount.rb', line 20 optional :applies_to_all, enum: -> { Orb::NewUsageDiscount::AppliesToAll }, nil?: true |
#applies_to_item_ids ⇒ Array<String>?
The set of item IDs to which this adjustment applies.
26 |
# File 'lib/orb/models/new_usage_discount.rb', line 26 optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true |
#applies_to_price_ids ⇒ Array<String>?
The set of price IDs to which this adjustment applies.
32 |
# File 'lib/orb/models/new_usage_discount.rb', line 32 optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true |
#currency ⇒ String?
If set, only prices in the specified currency will have the adjustment applied.
38 |
# File 'lib/orb/models/new_usage_discount.rb', line 38 optional :currency, String, nil?: true |
#filters ⇒ Array<Orb::Models::TransformPriceFilter>?
A list of filters that determine which prices this adjustment will apply to.
44 |
# File 'lib/orb/models/new_usage_discount.rb', line 44 optional :filters, -> { Orb::Internal::Type::ArrayOf[Orb::TransformPriceFilter] }, nil?: true |
#is_invoice_level ⇒ Boolean?
When false, this adjustment will be applied to a single price. Otherwise, it will be applied at the invoice level, possibly to multiple prices.
51 |
# File 'lib/orb/models/new_usage_discount.rb', line 51 optional :is_invoice_level, Orb::Internal::Type::Boolean |
#price_type ⇒ Symbol, ...
If set, only prices of the specified type will have the adjustment applied.
57 |
# File 'lib/orb/models/new_usage_discount.rb', line 57 optional :price_type, enum: -> { Orb::NewUsageDiscount::PriceType }, nil?: true |
#usage_discount ⇒ Float
14 |
# File 'lib/orb/models/new_usage_discount.rb', line 14 required :usage_discount, Float |
Class Method Details
.values ⇒ Array<Boolean>
|
|
# File 'lib/orb/models/new_usage_discount.rb', line 87
|