Class: Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig

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

Overview

See Also:

  • Orb::Models::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config

Defined Under Namespace

Classes: MatrixValue, ThresholdDiscountGroup

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(first_dimension_value:, unit_amount:, second_dimension_value: nil) ⇒ Object

Parameters:

  • first_dimension_value (String)
  • unit_amount (String)
  • second_dimension_value (String, nil) (defaults to: nil)


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

Instance Attribute Details

#default_unit_amountString

Unit price used for usage that does not match any defined matrix cell.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :default_unit_amount, String

#first_dimensionString

First matrix dimension key.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :first_dimension, String

#matrix_valuesArray<Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>

Per-cell unit prices.

Parameters:

  • value (::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue])

Returns:



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

required :matrix_values,
-> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] }

#second_dimensionString?

Optional second matrix dimension key.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :second_dimension, String, nil?: true

#threshold_discount_groupsArray<Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>?



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

optional :threshold_discount_groups,
-> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] }

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {