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 2524

Instance Attribute Details

#billable_metricOrb::Models::BillableMetricTiny?

Parameters:

Returns:



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

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

#billing_cycle_configurationOrb::Models::BillingCycleConfiguration



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

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

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

Parameters:

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

Returns:



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

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

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

Parameters:

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

Returns:



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

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

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

Parameters:

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

Returns:



2381
2382
2383
# File 'lib/orb/models/price.rb', line 2381

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

#conversion_rateFloat?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :conversion_rate, Float, nil?: true

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

Parameters:

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

Returns:



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

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

#created_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#credit_allocationOrb::Models::Allocation?

Parameters:

Returns:



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

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

#currencyString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :currency, String

#dimensional_price_configurationOrb::Models::DimensionalPriceConfiguration?



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

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

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

Deprecated.


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

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

#external_price_idString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :external_price_id, String, nil?: true

#fixed_price_quantityFloat?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :fixed_price_quantity, Float, nil?: true

#idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#invoice_grouping_keyString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :invoice_grouping_key, String, nil?: true

#invoicing_cycle_configurationOrb::Models::BillingCycleConfiguration?



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

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:



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

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:



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

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

#maximumOrb::Models::Maximum?

Deprecated.

Parameters:

Returns:



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

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

#maximum_amountString?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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})


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

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

#minimumOrb::Models::Minimum?

Deprecated.

Parameters:

Returns:



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

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

#minimum_amountString?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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)


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

required :model_type, const: :threshold_total_amount

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#plan_phase_orderInteger?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

required :plan_phase_order, Integer, nil?: true

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

Parameters:

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

Returns:



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

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)


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

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:



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

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {