Class: Orb::Models::Price::ThresholdTotalAmount

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, ThresholdTotalAmountConfig

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(threshold:, total_amount:) ⇒ Object

Configuration for a single threshold

Parameters:

  • threshold (String)
  • total_amount (String)

    Total amount for this threshold



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

Instance Attribute Details

#billable_metricOrb::Models::BillableMetricTiny?

Parameters:

Returns:



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

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

#billing_cycle_configurationOrb::Models::BillingCycleConfiguration



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

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

#billing_modeSymbol, Orb::Models::Price::ThresholdTotalAmount::BillingMode

Parameters:

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

Returns:



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

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

#cadenceSymbol, Orb::Models::Price::ThresholdTotalAmount::Cadence

Parameters:

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

Returns:



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

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

#composite_price_filtersArray<Orb::Models::Price::ThresholdTotalAmount::CompositePriceFilter>?

Parameters:

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

Returns:



2379
2380
2381
# File 'lib/orb/models/price.rb', line 2379

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

#conversion_rateFloat?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :conversion_rate, Float, nil?: true

#conversion_rate_configOrb::Models::UnitConversionRateConfig, ...

Parameters:

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

Returns:



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

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

#created_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#credit_allocationOrb::Models::Allocation?

Parameters:

Returns:



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

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

#currencyString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :currency, String

#dimensional_price_configurationOrb::Models::DimensionalPriceConfiguration?



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

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

#discountOrb::Models::PercentageDiscount, ...

Deprecated.


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

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

#external_price_idString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :external_price_id, String, nil?: true

#fixed_price_quantityFloat?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :fixed_price_quantity, Float, nil?: true

#idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#invoice_grouping_keyString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :invoice_grouping_key, String, nil?: true

#invoicing_cycle_configurationOrb::Models::BillingCycleConfiguration?



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

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

#itemOrb::Models::ItemSlim

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

Parameters:

Returns:



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

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

#license_typeOrb::Models::Price::ThresholdTotalAmount::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::ThresholdTotalAmount::LicenseType, nil)

Returns:



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

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

#maximumOrb::Models::Maximum?

Deprecated.

Parameters:

Returns:



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

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

#maximum_amountString?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :maximum_amount, String, nil?: true

#metadataHash{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})


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

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

#minimumOrb::Models::Minimum?

Deprecated.

Parameters:

Returns:



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

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

#minimum_amountString?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :minimum_amount, String, nil?: true

#model_typeSymbol, :threshold_total_amount

The pricing model type

Parameters:

  • value (:threshold_total_amount)

Returns:

  • (Symbol, :threshold_total_amount)


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

required :model_type, const: :threshold_total_amount

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#plan_phase_orderInteger?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

required :plan_phase_order, Integer, nil?: true

#price_typeSymbol, Orb::Models::Price::ThresholdTotalAmount::PriceType

Parameters:

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

Returns:



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

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

#replaces_price_idString?

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)


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

required :replaces_price_id, String, nil?: true

#threshold_total_amount_configOrb::Models::Price::ThresholdTotalAmount::ThresholdTotalAmountConfig

Configuration for threshold_total_amount pricing

Parameters:

  • value (Orb::Price::ThresholdTotalAmount::ThresholdTotalAmountConfig)

Returns:



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

required :threshold_total_amount_config,
-> { Orb::Price::ThresholdTotalAmount::ThresholdTotalAmountConfig }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {