Class: Orb::Models::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/price.rb,
sig/orb/models/price.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(default_unit_amount:, dimension:, tiers:) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig for more details.

Configuration for grouped_tiered_matrix pricing

Parameters:

  • default_unit_amount (String)

    Per unit rate for usage whose dimension value has no configured tiers

  • dimension (String)

    The billable metric property used to group usage before tiering

  • tiers (Array<Orb::Models::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier>)

    Graduated tiers keyed by dimension value; usage for a value is tiered only again



4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
# File 'lib/orb/models/price.rb', line 4373

class Tier < Orb::Internal::Type::BaseModel
  # @!attribute dimension_value
  #   The dimension value this tier applies to
  #
  #   @return [String]
  required :dimension_value, String

  # @!attribute tier_lower_bound
  #
  #   @return [String]
  required :tier_lower_bound, String

  # @!attribute unit_amount
  #   Per unit amount
  #
  #   @return [String]
  required :unit_amount, String

  # @!method initialize(dimension_value:, tier_lower_bound:, unit_amount:)
  #   Configuration for a single tier scoped to a dimension value
  #
  #   @param dimension_value [String] The dimension value this tier applies to
  #
  #   @param tier_lower_bound [String]
  #
  #   @param unit_amount [String] Per unit amount
end

Instance Attribute Details

#dimension_valueString

The dimension value this tier applies to

Parameters:

  • value (String)

Returns:

  • (String)


4378
# File 'lib/orb/models/price.rb', line 4378

required :dimension_value, String

#tier_lower_boundString

Parameters:

  • value (String)

Returns:

  • (String)


4383
# File 'lib/orb/models/price.rb', line 4383

required :tier_lower_bound, String

#unit_amountString

Per unit amount

Parameters:

  • value (String)

Returns:

  • (String)


4389
# File 'lib/orb/models/price.rb', line 4389

required :unit_amount, String

Instance Method Details

#to_hash{

Returns:

  • ({)


3265
# File 'sig/orb/models/price.rbs', line 3265

def to_hash: -> {