Class: Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue

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(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) ⇒ Object

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

Configuration for daily_credit_allowance pricing

matrix_

Parameters:

  • daily_allowance (String)

    Credits granted per day. Lose-it-or-use-it; does not roll over.

  • default_unit_amount (String)

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

  • dimensions (Array<String, nil>)

    One or two event property values to evaluate matrix groups by

  • event_day_property (String)

    Event property whose value identifies the day bucket the event belongs to (e.g.

  • matrix_values (Array<Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>)

    Per-dimension credit rates



12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
# File 'lib/orb/models/price.rb', line 12292

class MatrixValue < Orb::Internal::Type::BaseModel
  # @!attribute dimension_values
  #   One or two matrix keys to filter usage to this value by. For example, ["model"]
  #   could be used to apply a different credit rate to each AI model.
  #
  #   @return [Array<String, nil>]
  required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true]

  # @!attribute unit_amount
  #   Credits charged per unit of usage matching the specified dimension_values
  #
  #   @return [String]
  required :unit_amount, String

  # @!method initialize(dimension_values:, unit_amount:)
  #   Some parameter documentations has been truncated, see
  #   {Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue}
  #   for more details.
  #
  #   Per-dimension credit price for the daily credit allowance model.
  #
  #   @param dimension_values [Array<String, nil>] One or two matrix keys to filter usage to this value by. For example, ["model"]
  #
  #   @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values
end

Instance Attribute Details

#dimension_valuesArray<String, nil>

One or two matrix keys to filter usage to this value by. For example, ["model"] could be used to apply a different credit rate to each AI model.

Parameters:

  • value (::Array[String?])

Returns:

  • (Array<String, nil>)


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

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

#unit_amountString

Credits charged per unit of usage matching the specified dimension_values

Parameters:

  • value (String)

Returns:

  • (String)


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

required :unit_amount, String

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {