Class: Orb::Models::TieredConfig

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/tiered_config.rb,
sig/orb/models/tiered_config.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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:, prorated: nil) ⇒ TieredConfig

Configuration for tiered pricing

Parameters:

  • tiers (Array<Orb::Models::Tier>)

    Tiers for rating based on total usage quantities into the specified tier

  • prorated (Boolean) (defaults to: nil)

    If true, subtotals from this price are prorated based on the service period

  • tiers: (::Array[Orb::Tier])
  • prorated: (Boolean) (defaults to: nil)


# File 'lib/orb/models/tiered_config.rb', line 18

Instance Attribute Details

#proratedBoolean?

If true, subtotals from this price are prorated based on the service period

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


16
# File 'lib/orb/models/tiered_config.rb', line 16

optional :prorated, Orb::Internal::Type::Boolean

#tiersArray<Orb::Models::Tier>

Tiers for rating based on total usage quantities into the specified tier

Parameters:

Returns:



10
# File 'lib/orb/models/tiered_config.rb', line 10

required :tiers, -> { Orb::Internal::Type::ArrayOf[Orb::Tier] }

Instance Method Details

#to_hash{ tiers: ::Array[Orb::Tier], prorated: bool }

Returns:

  • ({ tiers: ::Array[Orb::Tier], prorated: bool })


14
# File 'sig/orb/models/tiered_config.rbs', line 14

def to_hash: -> { tiers: ::Array[Orb::Tier], prorated: bool }