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

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

Defined Under Namespace

Modules: BillingMode, Cadence, PriceType Classes: CompositePriceFilter, LicenseType, MatrixWithThresholdDiscountsConfig

Instance Attribute Summary collapse

Class Method 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(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup for more details.

Parameters:

  • above_threshold_discount_percentage (String) —

    Discount rate applied to spend above the threshold.

  • below_threshold_discount_percentage (String) —

    Discount rate applied to spend at or below the threshold. Set to 0 for no baseli

  • cell_coordinates (String) —

    Semicolon-separated list of matrix cell coordinates targeted by this group. Each

  • threshold_amount (String)
  • description (String, nil) (defaults to: nil)


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

Instance Attribute Details

#billable_metric ⇒ Orb::Models::BillableMetricTiny?

Parameters:

Returns:



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

required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true

#billing_cycle_configuration ⇒ Orb::Models::BillingCycleConfiguration



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

required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration }

#billing_mode ⇒ Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::BillingMode

Parameters:

  • value (Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode)

Returns:



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

required :billing_mode, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::BillingMode }

#cadence ⇒ Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::Cadence

Parameters:

  • value (Orb::Models::Price::MatrixWithThresholdDiscounts::cadence)

Returns:



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

required :cadence, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::Cadence }

#composite_price_filters ⇒ Array<Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter>?

Parameters:

  • value (::Array[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter], nil)

Returns:



6495
6496
6497
6498
6499
# File 'lib/orb/models/price.rb', line 6495

required :composite_price_filters,
-> {
  Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]
},
nil?: true

#conversion_rate ⇒ Float?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :conversion_rate, Float, nil?: true

#conversion_rate_config ⇒ Orb::Models::UnitConversionRateConfig, ...

Parameters:

  • value (Orb::Models::conversion_rate_config, nil)

Returns:



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

required :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true

#created_at ⇒ Time

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#credit_allocation ⇒ Orb::Models::Allocation?

Parameters:

Returns:



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

required :credit_allocation, -> { Orb::Allocation }, nil?: true

#currency ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :currency, String

#dimensional_price_configuration ⇒ Orb::Models::DimensionalPriceConfiguration?



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

optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true

#discount ⇒ Orb::Models::PercentageDiscount, ...

Deprecated.


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

required :discount, union: -> { Orb::Discount }, nil?: true

#external_price_id ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :external_price_id, String, nil?: true

#fixed_price_quantity ⇒ Float?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :fixed_price_quantity, Float, nil?: true

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#invoice_grouping_key ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :invoice_grouping_key, String, nil?: true

#invoicing_cycle_configuration ⇒ Orb::Models::BillingCycleConfiguration?



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

required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true

#item ⇒ Orb::Models::ItemSlim

A minimal representation of an Item containing only the essential identifying information.

Parameters:

Returns:



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

required :item, -> { Orb::ItemSlim }

#license_type ⇒ Orb::Models::Price::MatrixWithThresholdDiscounts::LicenseType?

The LicenseType resource represents a type of license that can be assigned to users. License types are used during billing by grouping metrics on the configured grouping key.

Parameters:

  • value (Orb::Price::MatrixWithThresholdDiscounts::LicenseType, nil)

Returns:



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

optional :license_type, -> { Orb::Price::MatrixWithThresholdDiscounts::LicenseType }, nil?: true

#matrix_with_threshold_discounts_config ⇒ Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig

Configuration for matrix_with_threshold_discounts pricing

Parameters:

  • value (Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig)

Returns:



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

required :matrix_with_threshold_discounts_config,
-> { Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig }

#maximum ⇒ Orb::Models::Maximum?

Deprecated.

Parameters:

Returns:



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

required :maximum, -> { Orb::Maximum }, nil?: true

#maximum_amount ⇒ String?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :maximum_amount, String, nil?: true

#metadata ⇒ Hash{Symbol=>String}

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Parameters:

  • value (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String})


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

required :metadata, Orb::Internal::Type::HashOf[String]

#minimum ⇒ Orb::Models::Minimum?

Deprecated.

Parameters:

Returns:



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

required :minimum, -> { Orb::Minimum }, nil?: true

#minimum_amount ⇒ String?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :minimum_amount, String, nil?: true

#model_type ⇒ Symbol, :matrix_with_threshold_discounts

The pricing model type

Parameters:

  • value (:matrix_with_threshold_discounts)

Returns:

  • (Symbol, :matrix_with_threshold_discounts)


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

required :model_type, const: :matrix_with_threshold_discounts

#name ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#plan_phase_order ⇒ Integer?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

required :plan_phase_order, Integer, nil?: true

#price_type ⇒ Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::PriceType

Parameters:

  • value (Orb::Models::Price::MatrixWithThresholdDiscounts::price_type)

Returns:



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

required :price_type, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::PriceType }

#replaces_price_id ⇒ String?

The price id this price replaces. This price will take the place of the replaced price in plan version migrations.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :replaces_price_id, String, nil?: true

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


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

def to_hash: -> {