Class: Orb::Models::Price::Unit
Defined Under Namespace
Modules: BillingMode, Cadence, PriceType
Classes: CompositePriceFilter, LicenseType
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
-
#initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, unit_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :unit) ⇒ Object
constructor
Some parameter documentations has been truncated, see Unit for more details.
-
#to_hash ⇒ {
==, #==, #[], 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
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, unit_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :unit) ⇒ Object
|
# File 'lib/orb/models/price.rb', line 259
|
Instance Attribute Details
97
|
# File 'lib/orb/models/price.rb', line 97
required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true
|
102
|
# File 'lib/orb/models/price.rb', line 102
required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration }
|
107
|
# File 'lib/orb/models/price.rb', line 107
required :billing_mode, enum: -> { Orb::Price::Unit::BillingMode }
|
112
|
# File 'lib/orb/models/price.rb', line 112
required :cadence, enum: -> { Orb::Price::Unit::Cadence }
|
117
118
119
|
# File 'lib/orb/models/price.rb', line 117
required :composite_price_filters,
-> { Orb::Internal::Type::ArrayOf[Orb::Price::Unit::CompositePriceFilter] },
nil?: true
|
#conversion_rate ⇒ Float?
124
|
# File 'lib/orb/models/price.rb', line 124
required :conversion_rate, Float, nil?: true
|
129
|
# File 'lib/orb/models/price.rb', line 129
required :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
#created_at ⇒ Time
134
|
# File 'lib/orb/models/price.rb', line 134
required :created_at, Time
|
139
|
# File 'lib/orb/models/price.rb', line 139
required :credit_allocation, -> { Orb::Allocation }, nil?: true
|
#currency ⇒ String
144
|
# File 'lib/orb/models/price.rb', line 144
required :currency, String
|
249
|
# File 'lib/orb/models/price.rb', line 249
optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true
|
150
|
# File 'lib/orb/models/price.rb', line 150
required :discount, union: -> { Orb::Discount }, nil?: true
|
#external_price_id ⇒ String?
155
|
# File 'lib/orb/models/price.rb', line 155
required :external_price_id, String, nil?: true
|
#fixed_price_quantity ⇒ Float?
160
|
# File 'lib/orb/models/price.rb', line 160
required :fixed_price_quantity, Float, nil?: true
|
#id ⇒ String
92
|
# File 'lib/orb/models/price.rb', line 92
required :id, String
|
#invoice_grouping_key ⇒ String?
165
|
# File 'lib/orb/models/price.rb', line 165
required :invoice_grouping_key, String, nil?: true
|
170
|
# File 'lib/orb/models/price.rb', line 170
required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true
|
A minimal representation of an Item containing only the essential identifying
information.
177
|
# File 'lib/orb/models/price.rb', line 177
required :item, -> { Orb::ItemSlim }
|
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.
257
|
# File 'lib/orb/models/price.rb', line 257
optional :license_type, -> { Orb::Price::Unit::LicenseType }, nil?: true
|
183
|
# File 'lib/orb/models/price.rb', line 183
required :maximum, -> { Orb::Maximum }, nil?: true
|
#maximum_amount ⇒ String?
189
|
# File 'lib/orb/models/price.rb', line 189
required :maximum_amount, String, nil?: true
|
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.
198
|
# File 'lib/orb/models/price.rb', line 198
required :metadata, Orb::Internal::Type::HashOf[String]
|
204
|
# File 'lib/orb/models/price.rb', line 204
required :minimum, -> { Orb::Minimum }, nil?: true
|
#minimum_amount ⇒ String?
210
|
# File 'lib/orb/models/price.rb', line 210
required :minimum_amount, String, nil?: true
|
#model_type ⇒ Symbol, :unit
216
|
# File 'lib/orb/models/price.rb', line 216
required :model_type, const: :unit
|
#name ⇒ String
221
|
# File 'lib/orb/models/price.rb', line 221
required :name, String
|
#plan_phase_order ⇒ Integer?
226
|
# File 'lib/orb/models/price.rb', line 226
required :plan_phase_order, Integer, nil?: true
|
231
|
# File 'lib/orb/models/price.rb', line 231
required :price_type, enum: -> { Orb::Price::Unit::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.
238
|
# File 'lib/orb/models/price.rb', line 238
required :replaces_price_id, String, nil?: true
|
Configuration for unit pricing
244
|
# File 'lib/orb/models/price.rb', line 244
required :unit_config, -> { Orb::UnitConfig }
|
Class Method Details
.values ⇒ Array<Symbol>
|
# File 'lib/orb/models/price.rb', line 330
|
Instance Method Details
#to_hash ⇒ {
170
|
# File 'sig/orb/models/price.rbs', line 170
def to_hash: -> {
|