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 9580

Instance Attribute Details

#billable_metric ⇒ Orb::Models::BillableMetricTiny?

Parameters:

Returns:



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

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

#billing_cycle_configuration ⇒ Orb::Models::BillingCycleConfiguration



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

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

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

Parameters:

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

Returns:



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

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

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

Parameters:

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

Returns:



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

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

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

Parameters:

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

Returns:



9435
9436
9437
9438
9439
# File 'lib/orb/models/price.rb', line 9435

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

#conversion_rate ⇒ Float?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :conversion_rate, Float, nil?: true

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

Parameters:

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

Returns:



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

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

#created_at ⇒ Time

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#credit_allocation ⇒ Orb::Models::Allocation?

Parameters:

Returns:



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

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

#currency ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :currency, String

#dimensional_price_configuration ⇒ Orb::Models::DimensionalPriceConfiguration?



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

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

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

Deprecated.


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

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

#external_price_id ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :external_price_id, String, nil?: true

#fixed_price_quantity ⇒ Float?

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :fixed_price_quantity, Float, nil?: true

#grouped_with_min_max_thresholds_config ⇒ Orb::Models::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig

Configuration for grouped_with_min_max_thresholds pricing

Parameters:

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

Returns:



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

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

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#invoice_grouping_key ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :invoice_grouping_key, String, nil?: true

#invoicing_cycle_configuration ⇒ Orb::Models::BillingCycleConfiguration?



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

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:



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

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

#license_type ⇒ Orb::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:



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

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

#maximum ⇒ Orb::Models::Maximum?

Deprecated.

Parameters:

Returns:



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

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

#maximum_amount ⇒ String?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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


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

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

#minimum ⇒ Orb::Models::Minimum?

Deprecated.

Parameters:

Returns:



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

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

#minimum_amount ⇒ String?

Deprecated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :minimum_amount, String, nil?: true

#model_type ⇒ Symbol, :grouped_with_min_max_thresholds

The pricing model type

Parameters:

  • value (:grouped_with_min_max_thresholds)

Returns:

  • (Symbol, :grouped_with_min_max_thresholds)


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

required :model_type, const: :grouped_with_min_max_thresholds

#name ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#plan_phase_order ⇒ Integer?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

required :plan_phase_order, Integer, nil?: true

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

Parameters:

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

Returns:



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

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


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

required :replaces_price_id, String, nil?: true

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


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

def to_hash: -> {