Class: Orb::Models::UsageDiscountInterval
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::UsageDiscountInterval
- Defined in:
- lib/orb/models/usage_discount_interval.rb,
sig/orb/models/usage_discount_interval.rbs
Defined Under Namespace
Modules: DiscountType Classes: Filter
Instance Attribute Summary collapse
-
#applies_to_price_interval_ids ⇒ Array<String>
The price interval ids that this discount interval applies to.
- #discount_type ⇒ Symbol, Orb::Models::UsageDiscountInterval::DiscountType
-
#end_date ⇒ Time?
The end date of the discount interval.
-
#filters ⇒ Array<Orb::Models::UsageDiscountInterval::Filter>
The filters that determine which prices this discount interval applies to.
-
#start_date ⇒ Time
The start date of the discount interval.
-
#usage_discount ⇒ Float
Only available if discount_type is
usage.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(applies_to_price_interval_ids:, discount_type:, end_date:, filters:, start_date:, usage_discount:) ⇒ Object
constructor
Some parameter documentations has been truncated, see UsageDiscountInterval 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(applies_to_price_interval_ids:, discount_type:, end_date:, filters:, start_date:, usage_discount:) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::UsageDiscountInterval for more details.
|
|
# File 'lib/orb/models/usage_discount_interval.rb', line 42
|
Instance Attribute Details
#applies_to_price_interval_ids ⇒ Array<String>
The price interval ids that this discount interval applies to.
10 |
# File 'lib/orb/models/usage_discount_interval.rb', line 10 required :applies_to_price_interval_ids, Orb::Internal::Type::ArrayOf[String] |
#discount_type ⇒ Symbol, Orb::Models::UsageDiscountInterval::DiscountType
15 |
# File 'lib/orb/models/usage_discount_interval.rb', line 15 required :discount_type, enum: -> { Orb::UsageDiscountInterval::DiscountType } |
#end_date ⇒ Time?
The end date of the discount interval.
21 |
# File 'lib/orb/models/usage_discount_interval.rb', line 21 required :end_date, Time, nil?: true |
#filters ⇒ Array<Orb::Models::UsageDiscountInterval::Filter>
The filters that determine which prices this discount interval applies to.
27 |
# File 'lib/orb/models/usage_discount_interval.rb', line 27 required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::UsageDiscountInterval::Filter] } |
#start_date ⇒ Time
The start date of the discount interval.
33 |
# File 'lib/orb/models/usage_discount_interval.rb', line 33 required :start_date, Time |
#usage_discount ⇒ Float
Only available if discount_type is usage. Number of usage units that this
discount is for
40 |
# File 'lib/orb/models/usage_discount_interval.rb', line 40 required :usage_discount, Float |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/orb/models/usage_discount_interval.rb', line 64
|
Instance Method Details
#to_hash ⇒ {
35 |
# File 'sig/orb/models/usage_discount_interval.rbs', line 35
def to_hash: -> {
|