Class: Orb::Models::Price::GroupedWithMinMaxThresholds

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, GroupedWithMinMaxThresholdsConfig, LicenseType

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(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) ⇒ Object

Configuration for grouped_with_min_max_thresholds pricing

Parameters:

  • grouping_key (String)

    The event property used to group before applying thresholds

  • maximum_charge (String)

    The maximum amount to charge each group

  • minimum_charge (String)

    The minimum amount to charge each group, regardless of usage

  • per_unit_rate (String)

    The base price charged per group



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

Instance Attribute Details

#billable_metricOrb::Models::BillableMetricTiny?

Parameters:

Returns:



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

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

#billing_cycle_configurationOrb::Models::BillingCycleConfiguration



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

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

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

Parameters:

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

Returns:



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

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

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

Parameters:

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

Returns:



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

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

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

Parameters:

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

Returns:



8554
8555
8556
8557
8558
# File 'lib/orb/models/price.rb', line 8554

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

#conversion_rateFloat?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :conversion_rate, Float, nil?: true

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

Parameters:

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

Returns:



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

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

#created_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#credit_allocationOrb::Models::Allocation?

Parameters:

Returns:



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

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

#currencyString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :currency, String

#dimensional_price_configurationOrb::Models::DimensionalPriceConfiguration?



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

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

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

Deprecated.


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

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

#external_price_idString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :external_price_id, String, nil?: true

#fixed_price_quantityFloat?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :fixed_price_quantity, Float, nil?: true

#grouped_with_min_max_thresholds_configOrb::Models::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig

Configuration for grouped_with_min_max_thresholds pricing

Parameters:

  • value (Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig)

Returns:



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

required :grouped_with_min_max_thresholds_config,
-> { Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }

#idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#invoice_grouping_keyString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :invoice_grouping_key, String, nil?: true

#invoicing_cycle_configurationOrb::Models::BillingCycleConfiguration?



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

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:



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

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

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

Returns:



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

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

#maximumOrb::Models::Maximum?

Deprecated.

Parameters:

Returns:



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

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

#maximum_amountString?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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


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

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

#minimumOrb::Models::Minimum?

Deprecated.

Parameters:

Returns:



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

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

#minimum_amountString?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :minimum_amount, String, nil?: true

#model_typeSymbol, :grouped_with_min_max_thresholds

The pricing model type

Parameters:

  • value (:grouped_with_min_max_thresholds)

Returns:

  • (Symbol, :grouped_with_min_max_thresholds)


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

required :model_type, const: :grouped_with_min_max_thresholds

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#plan_phase_orderInteger?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

required :plan_phase_order, Integer, nil?: true

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

Parameters:

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

Returns:



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

required :price_type, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::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)


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

required :replaces_price_id, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {