Class: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig

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

Overview

See Also:

  • Orb::Models::BetaCreatePlanVersionParams::AddPrice::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/beta_create_plan_version_params.rb', line 1773

Instance Attribute Details

#default_unit_amount ⇒ String

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

Parameters:

  • value (String)

Returns:

  • (String)


1709
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 1709

required :default_unit_amount, String

#first_dimension ⇒ String

First matrix dimension key.

Parameters:

  • value (String)

Returns:

  • (String)


1715
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 1715

required :first_dimension, String

#matrix_values ⇒ Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>

Per-cell unit prices.

Parameters:

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

Returns:



1721
1722
1723
1724
1725
1726
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 1721

required :matrix_values,
-> do
  Orb::Internal::Type::ArrayOf[
    Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
  ]
end

#second_dimension ⇒ String?

Optional second matrix dimension key.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


1732
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 1732

optional :second_dimension, String, nil?: true

#threshold_discount_groups ⇒ Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>?



1737
1738
1739
1740
1741
1742
# File 'lib/orb/models/beta_create_plan_version_params.rb', line 1737

optional :threshold_discount_groups,
-> do
  Orb::Internal::Type::ArrayOf[
    Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
  ]
end

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


1213
# File 'sig/orb/models/beta_create_plan_version_params.rbs', line 1213

def to_hash: -> {