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 9131

Instance Attribute Details

#billable_metricOrb::Models::BillableMetricTiny?

Parameters:

Returns:



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

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

#billing_cycle_configurationOrb::Models::BillingCycleConfiguration



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

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

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

Parameters:

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

Returns:



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

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

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

Parameters:

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

Returns:



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

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

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

Parameters:

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

Returns:



8986
8987
8988
8989
8990
# File 'lib/orb/models/price.rb', line 8986

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

#conversion_rateFloat?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :conversion_rate, Float, nil?: true

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

Parameters:

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

Returns:



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

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

#created_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#credit_allocationOrb::Models::Allocation?

Parameters:

Returns:



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

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

#currencyString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :currency, String

#dimensional_price_configurationOrb::Models::DimensionalPriceConfiguration?



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

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

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

Deprecated.


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

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

#external_price_idString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :external_price_id, String, nil?: true

#fixed_price_quantityFloat?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

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:



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

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

#idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#invoice_grouping_keyString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :invoice_grouping_key, String, nil?: true

#invoicing_cycle_configurationOrb::Models::BillingCycleConfiguration?



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

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:



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

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:



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

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

#maximumOrb::Models::Maximum?

Deprecated.

Parameters:

Returns:



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

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

#maximum_amountString?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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


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

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

#minimumOrb::Models::Minimum?

Deprecated.

Parameters:

Returns:



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

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

#minimum_amountString?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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)


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

required :model_type, const: :grouped_with_min_max_thresholds

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#plan_phase_orderInteger?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

required :plan_phase_order, Integer, nil?: true

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

Parameters:

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

Returns:



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

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)


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

required :replaces_price_id, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {