Class: Orb::Models::MatrixConfig

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

Configuration for matrix pricing

Parameters:

  • default_unit_amount (String)

    Default per unit rate for any usage not bucketed into a specified matrix_value

  • dimensions (Array<String, nil>)

    One or two event property values to evaluate matrix groups by

  • matrix_values (Array<Orb::Models::MatrixValue>)

    Matrix values configuration



# File 'lib/orb/models/matrix_config.rb', line 24

Instance Attribute Details

#default_unit_amountString

Default per unit rate for any usage not bucketed into a specified matrix_value

Parameters:

  • value (String)

Returns:

  • (String)


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

required :default_unit_amount, String

#dimensionsArray<String, nil>

One or two event property values to evaluate matrix groups by

Parameters:

  • value (::Array[String?])

Returns:

  • (Array<String, nil>)


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

required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true]

#matrix_valuesArray<Orb::Models::MatrixValue>

Matrix values configuration

Parameters:

Returns:



22
# File 'lib/orb/models/matrix_config.rb', line 22

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

Instance Method Details

#to_hash{

Returns:

  • ({)


23
# File 'sig/orb/models/matrix_config.rbs', line 23

def to_hash: -> {